sl@0: # 2005 December 29 sl@0: # sl@0: # The author disclaims copyright to this source code. In place of sl@0: # a legal notice, here is a blessing: sl@0: # sl@0: # May you do good and not evil. sl@0: # May you find forgiveness for yourself and forgive others. sl@0: # May you share freely, never taking more than you give. sl@0: # sl@0: #*********************************************************************** sl@0: # This file implements regression tests for SQLite library. sl@0: # sl@0: # This file implements tests to verify that the new serial_type sl@0: # values of 8 (integer 0) and 9 (integer 1) work correctly. sl@0: # sl@0: sl@0: set testdir [file dirname $argv0] sl@0: source $testdir/tester.tcl sl@0: sl@0: db eval {PRAGMA legacy_file_format=OFF} sl@0: sl@0: # The size of the database depends on whether or not autovacuum sl@0: # is enabled. sl@0: # sl@0: ifcapable autovacuum { sl@0: if {[db one {PRAGMA auto_vacuum}]} { sl@0: set small 3072 sl@0: set large 5120 sl@0: } else { sl@0: set small 2048 sl@0: set large 4096 sl@0: } sl@0: } else { sl@0: set small 2048 sl@0: set large 4096 sl@0: } sl@0: sl@0: do_test format4-1.1 { sl@0: execsql { sl@0: CREATE TABLE t1(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9); sl@0: INSERT INTO t1 VALUES(0,0,0,0,0,0,0,0,0,0); sl@0: INSERT INTO t1 SELECT * FROM t1; sl@0: INSERT INTO t1 SELECT * FROM t1; sl@0: INSERT INTO t1 SELECT * FROM t1; sl@0: INSERT INTO t1 SELECT * FROM t1; sl@0: INSERT INTO t1 SELECT * FROM t1; sl@0: INSERT INTO t1 SELECT * FROM t1; sl@0: } sl@0: file size test.db sl@0: } $small sl@0: do_test format4-1.2 { sl@0: execsql { sl@0: UPDATE t1 SET x0=1, x1=1, x2=1, x3=1, x4=1, x5=1, x6=1, x7=1, x8=1, x9=1 sl@0: } sl@0: file size test.db sl@0: } $small sl@0: do_test format4-1.3 { sl@0: execsql { sl@0: UPDATE t1 SET x0=2, x1=2, x2=2, x3=2, x4=2, x5=2, x6=2, x7=2, x8=2, x9=2 sl@0: } sl@0: file size test.db sl@0: } $large sl@0: sl@0: sl@0: finish_test