3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
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.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this script is btree database backend.
14 # $Id: btree7.test,v 1.2 2004/11/04 14:47:13 drh Exp $
17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl
20 # Stress the balance routine by trying to create situations where
21 # 3 neighboring nodes split into 5.
23 set bigdata _123456789 ;# 10
24 append bigdata $bigdata ;# 20
25 append bigdata $bigdata ;# 40
26 append bigdata $bigdata ;# 80
27 append bigdata $bigdata ;# 160
28 append bigdata $bigdata ;# 320
29 append bigdata $bigdata ;# 640
30 set data450 [string range $bigdata 0 449]
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');
42 integrity_check btree7-1.2
45 INSERT INTO t1 VALUES(4, '$bigdata');
48 integrity_check btree7-1.4