aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/test/btree7.test
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/test/btree7.test')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/test/btree7.test50
1 files changed, 50 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/btree7.test b/libraries/sqlite/unix/sqlite-3.5.1/test/btree7.test
new file mode 100644
index 0000000..eaf3713
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/test/btree7.test
@@ -0,0 +1,50 @@
1# 2004 Jun 4
2#
3# The author disclaims copyright to this source code. In place of
4# a legal notice, here is a blessing:
5#
6# May you do good and not evil.
7# May you find forgiveness for yourself and forgive others.
8# May you share freely, never taking more than you give.
9#
10#***********************************************************************
11# This file implements regression tests for SQLite library. The
12# focus of this script is btree database backend.
13#
14# $Id: btree7.test,v 1.2 2004/11/04 14:47:13 drh Exp $
15
16
17set testdir [file dirname $argv0]
18source $testdir/tester.tcl
19
20# Stress the balance routine by trying to create situations where
21# 3 neighboring nodes split into 5.
22#
23set bigdata _123456789 ;# 10
24append bigdata $bigdata ;# 20
25append bigdata $bigdata ;# 40
26append bigdata $bigdata ;# 80
27append bigdata $bigdata ;# 160
28append bigdata $bigdata ;# 320
29append bigdata $bigdata ;# 640
30set data450 [string range $bigdata 0 449]
31do_test btree7-1.1 {
32 execsql "
33 CREATE TABLE t1(x INTEGER PRIMARY KEY, y TEXT);
34 INSERT INTO t1 VALUES(1, '$bigdata');
35 INSERT INTO t1 VALUES(2, '$bigdata');
36 INSERT INTO t1 VALUES(3, '$data450');
37 INSERT INTO t1 VALUES(5, '$data450');
38 INSERT INTO t1 VALUES(8, '$bigdata');
39 INSERT INTO t1 VALUES(9, '$bigdata');
40 "
41} {}
42integrity_check btree7-1.2
43do_test btree7-1.3 {
44 execsql "
45 INSERT INTO t1 VALUES(4, '$bigdata');
46 "
47} {}
48integrity_check btree7-1.4
49
50finish_test