Changes to test scripts to support alternative configurations. (CVS 3824)
FossilOrigin-Name: 3471a2269fb6b3769b59b70992e6da3bdebea7df
This commit is contained in:
parent
bb5f18d2ca
commit
1e9daa6ab5
34
manifest
34
manifest
@ -1,5 +1,5 @@
|
||||
C Additional\scoverage\stesting.\s(CVS\s3823)
|
||||
D 2007-04-06T18:23:18
|
||||
C Changes\sto\stest\sscripts\sto\ssupport\salternative\sconfigurations.\s(CVS\s3824)
|
||||
D 2007-04-06T21:42:22
|
||||
F Makefile.in 8cab54f7c9f5af8f22fd97ddf1ecfd1e1860de62
|
||||
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -101,7 +101,7 @@ F src/sqlite3ext.h 7d0d363ea7327e817ef0dfe1b7eee1f171b72890
|
||||
F src/sqliteInt.h 347160d30eb61210417f1086aeb57d7d3e2a8191
|
||||
F src/table.c 6d0da66dde26ee75614ed8f584a1996467088d06
|
||||
F src/tclsqlite.c ec69eb9ad56d03fbf7570ca1ca5ea947d1ec4b6f
|
||||
F src/test1.c 6021cbcede9bfab986ade678efa7226180f3edff
|
||||
F src/test1.c 35ad59fa1eca03489e53de1d611aaeb99df432bc
|
||||
F src/test2.c 24458b17ab2f3c90cbc1c8446bd7ffe69be62f88
|
||||
F src/test3.c 65f92247cf8592854e9bf5115b3fb711f8b33280
|
||||
F src/test4.c 8b784cd82de158a2317cb4ac4bc86f91ad315e25
|
||||
@ -169,7 +169,7 @@ F test/btree6.test a5ede6bfbbb2ec8b27e62813612c0f28e8f3e027
|
||||
F test/btree7.test a6d3b842db22af97dd14b989e90a2fd96066b72f
|
||||
F test/btree8.test fadc112bcbd6a0c622d34c813fc8a648eacf8804
|
||||
F test/busy.test 0271c854738e23ad76e10d4096a698e5af29d211
|
||||
F test/cache.test 02cd1d1b0e7ad59cf24b85d49d77705e33aa5224
|
||||
F test/cache.test 9e530b55ba016ca17439f728a06898f0ade5f1da
|
||||
F test/capi2.test 7ecc9b342cc9ec27b53bbf95724cf2e5874fd496
|
||||
F test/capi3.test 1675323145d128e5942a9faffcfd5cf4e219a33f
|
||||
F test/capi3b.test 5f0bc94b104e11086b1103b20277e1910f59c7f4
|
||||
@ -183,12 +183,12 @@ F test/collate4.test daf498e294dcd596b961d425c3f2dda117e4717e
|
||||
F test/collate5.test 8fb4e7e0241839356bd8710f437c32efb47bfff8
|
||||
F test/collate6.test 6c9470d1606ee3e564675b229653e320c49ec638
|
||||
F test/colmeta.test 6505c73ab58796afcb7c89ba9f429d573fbc6e53
|
||||
F test/conflict.test 8a59399f61a14296a9bfed02e0570590a8a79cba
|
||||
F test/conflict.test ac40064d46c4c259cf6c216d30aa5bcc26e7eea2
|
||||
F test/corrupt.test 18c7a995b1af76a8c8600b996257f2c7b7bff083
|
||||
F test/corrupt2.test 572f8df0303d0ce63ddad5c5c9101a83a345ae46
|
||||
F test/corrupt3.test 9b3a005c9692206f2800a948f0c9c79728ffee7f
|
||||
F test/corrupt3.test 263e8bb04e2728df832fddf6973cf54c91db0c32
|
||||
F test/crash.test 167eb4652eccbedb199b6f21850346c3f5d779fb
|
||||
F test/crash2.test ccc7d5f202aeadc3c13003829e6bb6561129f419
|
||||
F test/crash2.test 423c6ec404d15b7d7d0e40aef0a26740cce6075f
|
||||
F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
|
||||
F test/date.test 09786cf0145147014867d822224b9bced2012b61
|
||||
F test/default.test 252298e42a680146b1dd64f563b95bdf088d94fb
|
||||
@ -203,11 +203,11 @@ F test/distinctagg.test 2b89d1c5220d966a30ba4b40430338669301188b
|
||||
F test/enc.test 7a03417a1051fe8bc6c7641cf4c8c3f7e0066d52
|
||||
F test/enc2.test 45710bacfa9df29720bc84c067dfdf8c8ddfb797
|
||||
F test/enc3.test 890508efff6677345e93bf2a8adb0489b30df030
|
||||
F test/exclusive.test 6748eb0539c4652d596971584c50200729e57dbe
|
||||
F test/exclusive.test 5bc520ba366ae3d242420af025ab64d465b04706
|
||||
F test/exclusive2.test 8d580e5bb8d49fde59fe1142543b7da081f28d06
|
||||
F test/exclusive3.test 0e49c35b7e7cb8e7280b4ce3f0359d30b207d2ff
|
||||
F test/expr.test ab21e2fc3613595131efd7d8bbca4b95ed5cc608
|
||||
F test/filefmt.test 16107ce2c98843070ba5ec8f0c2ac31029bdabd6
|
||||
F test/filefmt.test 053b622009fbbb74dd37921ffad374d852c13cd8
|
||||
F test/fkey1.test dcb4f28eb22d5141f15161d6bdca9a4f58c95729
|
||||
F test/format4.test bf3bed3b13c63abfb3cfec232597a319a31d0bcc
|
||||
F test/fts1a.test 46090311f85da51bb33bd5ce84f7948359c6d8d7
|
||||
@ -256,12 +256,12 @@ F test/lastinsert.test 474d519c68cb79d07ecae56a763aa7f322c72f51
|
||||
F test/laststmtchanges.test 19a6d0c11f7a31dc45465b495f7b845a62cbec17
|
||||
F test/like.test 5f7d76574752a9101cac13372c8a85999d0d91e6
|
||||
F test/limit.test 2a87b9cb2165abb49ca0ddcf5cb43cf24074581f
|
||||
F test/loadext.test bee44cf7c6d54c5a46650bb2a1b0d778bcd34034
|
||||
F test/loadext2.test 4472af96306b127b378a1b2026fe15ed5863f9cf
|
||||
F test/loadext.test 9ab2cb0226329c1a62dd45d204be95158a872201
|
||||
F test/loadext2.test 95ca7e2cb03fd3e068de97c3a2fe58dbdfd769e1
|
||||
F test/lock.test 6825aea0b5885578b1b63a3b178803842c4ee9f1
|
||||
F test/lock2.test d83ba79d3c4fffdb5b926c7d8ca7a36c34288a55
|
||||
F test/lock3.test 615111293cf32aa2ed16d01c6611737651c96fb9
|
||||
F test/lock4.test c0a56659708bc45d134a18116bf01dd9ff765408
|
||||
F test/lock4.test 49e22396b9be6e047b3d35469f233be79153c9d5
|
||||
F test/main.test e7212ce1023957c7209778cc87fa932bd79ba89a
|
||||
F test/malloc.test d868a6b98b07928b00bca3d9874daf6885c86150
|
||||
F test/malloc2.test 4ed7d719542c4570dec9c2ebe2bbdf3a9f3b0d05
|
||||
@ -287,8 +287,8 @@ F test/null.test 9503e1f63e959544c006d9f01709c5b5eab67d54
|
||||
F test/pager.test 6c644725db2a79528f67a6f3472b9c9ddee17f05
|
||||
F test/pager2.test c025f91b75fe65e85febda64d9416428b8a5cab5
|
||||
F test/pager3.test 2323bf27fd5bd887b580247e5bce500ceee994b4
|
||||
F test/pagesize.test 05c74ea49f790734ec1e9ab765d9bf1cce79b8f2
|
||||
F test/pragma.test 4d2696d0c5bfc4ef28324684c2f9162243800496
|
||||
F test/pagesize.test e0a8b3fe80f8b8e808d94a00734c7a18c76c407e
|
||||
F test/pragma.test fecb7085f58d9fb5172a5c0b63fd3b25c7bfb414
|
||||
F test/printf.test 483b9fe75ffae1fb27328bdce5560b452ba83577
|
||||
F test/progress.test 8b22b4974b0a95272566385f8cb8c341c7130df8 x
|
||||
F test/quick.test c81ee93163f550e7ab420c7881d0dd415bad46f4
|
||||
@ -455,7 +455,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P 479b3d965b19c3ec4cb72542718751debf8ff75c
|
||||
R c44625c6b92ea887ac4e549d47a5b6a4
|
||||
P 26b2e1aede3f776134b2d6e941d17a907843e650
|
||||
R a613e3c3d27dabfc3ee74ed8f3cd493b
|
||||
U drh
|
||||
Z 81bb1941e9b9712f600f3f1f2f806f0c
|
||||
Z 3f5436e4db1d58055f5d0cc5ce8f8601
|
||||
|
@ -1 +1 @@
|
||||
26b2e1aede3f776134b2d6e941d17a907843e650
|
||||
3471a2269fb6b3769b59b70992e6da3bdebea7df
|
20
src/test1.c
20
src/test1.c
@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test1.c,v 1.234 2007/04/05 17:36:19 drh Exp $
|
||||
** $Id: test1.c,v 1.235 2007/04/06 21:42:22 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
@ -3979,6 +3979,12 @@ static void set_options(Tcl_Interp *interp){
|
||||
Tcl_SetVar2(interp, "sqlite_options", "like_opt", "1", TCL_GLOBAL_ONLY);
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_OMIT_LOAD_EXTENSION
|
||||
Tcl_SetVar2(interp, "sqlite_options", "load_ext", "0", TCL_GLOBAL_ONLY);
|
||||
#else
|
||||
Tcl_SetVar2(interp, "sqlite_options", "load_ext", "1", TCL_GLOBAL_ONLY);
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_OMIT_MEMORYDB
|
||||
Tcl_SetVar2(interp, "sqlite_options", "memorydb", "0", TCL_GLOBAL_ONLY);
|
||||
#else
|
||||
@ -4118,6 +4124,18 @@ static void set_options(Tcl_Interp *interp){
|
||||
Tcl_NewIntObj(SQLITE_DEFAULT_FILE_FORMAT), TCL_GLOBAL_ONLY
|
||||
);
|
||||
#endif
|
||||
#ifdef SQLITE_MAX_PAGE_SIZE
|
||||
Tcl_ObjSetVar2(interp,
|
||||
Tcl_NewStringObj("SQLITE_MAX_PAGE_SIZE", -1), 0,
|
||||
Tcl_NewIntObj(SQLITE_MAX_PAGE_SIZE), TCL_GLOBAL_ONLY
|
||||
);
|
||||
#endif
|
||||
#ifdef TEMP_STORE
|
||||
Tcl_ObjSetVar2(interp,
|
||||
Tcl_NewStringObj("TEMP_STORE", -1), 0,
|
||||
Tcl_NewIntObj(TEMP_STORE), TCL_GLOBAL_ONLY
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -9,7 +9,7 @@
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# $Id: cache.test,v 1.1 2007/04/02 05:07:48 danielk1977 Exp $
|
||||
# $Id: cache.test,v 1.2 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -31,6 +31,7 @@ do_test cache-1.1 {
|
||||
|
||||
do_test cache-1.2 {
|
||||
execsql {
|
||||
PRAGMA auto_vacuum=OFF;
|
||||
CREATE TABLE abc(a, b, c);
|
||||
INSERT INTO abc VALUES(1, 2, 3);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
# This file implements tests for the conflict resolution extension
|
||||
# to SQLite.
|
||||
#
|
||||
# $Id: conflict.test,v 1.28 2007/01/03 23:37:29 drh Exp $
|
||||
# $Id: conflict.test,v 1.29 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -282,34 +282,39 @@ do_test conflict-6.0 {
|
||||
# t0 True if there is an error from $cmd
|
||||
# t1 Content of "b" column of t1 assuming no error in $cmd
|
||||
# t2 Content of "x" column of t3
|
||||
# t3 Number of temporary files created
|
||||
# t3 Number of temporary files for tables
|
||||
# t4 Number of temporary files for statement journals
|
||||
#
|
||||
foreach {i conf1 cmd t0 t1 t2 t3} {
|
||||
1 {} UPDATE 1 {6 7 8 9} 1 1
|
||||
2 REPLACE UPDATE 0 {7 6 9} 1 1
|
||||
3 IGNORE UPDATE 0 {6 7 3 9} 1 1
|
||||
4 FAIL UPDATE 1 {6 7 3 4} 1 0
|
||||
5 ABORT UPDATE 1 {1 2 3 4} 1 1
|
||||
6 ROLLBACK UPDATE 1 {1 2 3 4} 0 0
|
||||
7 REPLACE {UPDATE OR IGNORE} 0 {6 7 3 9} 1 1
|
||||
8 IGNORE {UPDATE OR REPLACE} 0 {7 6 9} 1 1
|
||||
9 FAIL {UPDATE OR IGNORE} 0 {6 7 3 9} 1 1
|
||||
10 ABORT {UPDATE OR REPLACE} 0 {7 6 9} 1 1
|
||||
11 ROLLBACK {UPDATE OR IGNORE} 0 {6 7 3 9} 1 1
|
||||
12 {} {UPDATE OR IGNORE} 0 {6 7 3 9} 1 1
|
||||
13 {} {UPDATE OR REPLACE} 0 {7 6 9} 1 1
|
||||
14 {} {UPDATE OR FAIL} 1 {6 7 3 4} 1 0
|
||||
15 {} {UPDATE OR ABORT} 1 {1 2 3 4} 1 1
|
||||
16 {} {UPDATE OR ROLLBACK} 1 {1 2 3 4} 0 0
|
||||
foreach {i conf1 cmd t0 t1 t2 t3 t4} {
|
||||
1 {} UPDATE 1 {6 7 8 9} 1 0 1
|
||||
2 REPLACE UPDATE 0 {7 6 9} 1 1 0
|
||||
3 IGNORE UPDATE 0 {6 7 3 9} 1 1 0
|
||||
4 FAIL UPDATE 1 {6 7 3 4} 1 0 0
|
||||
5 ABORT UPDATE 1 {1 2 3 4} 1 0 1
|
||||
6 ROLLBACK UPDATE 1 {1 2 3 4} 0 0 0
|
||||
7 REPLACE {UPDATE OR IGNORE} 0 {6 7 3 9} 1 1 0
|
||||
8 IGNORE {UPDATE OR REPLACE} 0 {7 6 9} 1 1 0
|
||||
9 FAIL {UPDATE OR IGNORE} 0 {6 7 3 9} 1 1 0
|
||||
10 ABORT {UPDATE OR REPLACE} 0 {7 6 9} 1 1 0
|
||||
11 ROLLBACK {UPDATE OR IGNORE} 0 {6 7 3 9} 1 1 0
|
||||
12 {} {UPDATE OR IGNORE} 0 {6 7 3 9} 1 1 0
|
||||
13 {} {UPDATE OR REPLACE} 0 {7 6 9} 1 1 0
|
||||
14 {} {UPDATE OR FAIL} 1 {6 7 3 4} 1 0 0
|
||||
15 {} {UPDATE OR ABORT} 1 {1 2 3 4} 1 0 1
|
||||
16 {} {UPDATE OR ROLLBACK} 1 {1 2 3 4} 0 0 0
|
||||
} {
|
||||
if {$t0} {set t1 {column a is not unique}}
|
||||
if {[info exists TEMP_STORE] && $TEMP_STORE>=2} {
|
||||
set t3 $t4
|
||||
} else {
|
||||
set t3 [expr {$t3+$t4}]
|
||||
}
|
||||
do_test conflict-6.$i {
|
||||
db close
|
||||
sqlite3 db test.db
|
||||
if {$conf1!=""} {set conf1 "ON CONFLICT $conf1"}
|
||||
execsql {pragma temp_store=file}
|
||||
set ::sqlite_opentemp_count 0
|
||||
if {$i==2} btree_breakpoint
|
||||
set r0 [catch {execsql [subst {
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a,b,c, UNIQUE(a) $conf1);
|
||||
|
@ -13,7 +13,7 @@
|
||||
# This file implements tests to make sure SQLite does not crash or
|
||||
# segfault if it sees a corrupt database file.
|
||||
#
|
||||
# $Id: corrupt3.test,v 1.1 2007/04/06 15:02:14 drh Exp $
|
||||
# $Id: corrupt3.test,v 1.2 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -30,6 +30,7 @@ ifcapable !pager_pragmas {
|
||||
do_test corrupt3-1.1 {
|
||||
set bigstring [string repeat 0123456789 200]
|
||||
execsql {
|
||||
PRAGMA auto_vacuum=OFF;
|
||||
PRAGMA page_size=1024;
|
||||
CREATE TABLE t1(x);
|
||||
INSERT INTO t1 VALUES($bigstring);
|
||||
|
@ -16,7 +16,7 @@
|
||||
# specifically, the tests in this file verify this functionality
|
||||
# for storage mediums with various sector sizes.
|
||||
#
|
||||
# $Id: crash2.test,v 1.3 2007/03/19 15:04:54 danielk1977 Exp $
|
||||
# $Id: crash2.test,v 1.4 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -32,6 +32,7 @@ ifcapable !crashtest {
|
||||
#
|
||||
do_test crash2-1.1 {
|
||||
crashsql -delay 500 -file test.db -blocksize 2048 {
|
||||
PRAGMA auto_vacuum=OFF;
|
||||
BEGIN;
|
||||
CREATE TABLE abc AS SELECT 1 AS a, 2 AS b, 3 AS c;
|
||||
CREATE TABLE def AS SELECT 1 AS d, 2 AS e, 3 AS f;
|
||||
@ -121,4 +122,3 @@ for {set i 1} {$i < 10} {incr i} {
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# of these tests is exclusive access mode (i.e. the thing activated by
|
||||
# "PRAGMA locking_mode = EXCLUSIVE").
|
||||
#
|
||||
# $Id: exclusive.test,v 1.4 2007/03/30 16:01:55 drh Exp $
|
||||
# $Id: exclusive.test,v 1.5 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -29,6 +29,15 @@ file delete -force test3.db
|
||||
file delete -force test4.db-journal
|
||||
file delete -force test4.db
|
||||
|
||||
# The locking mode for the TEMP table is always "exclusive" for
|
||||
# on-disk tables and "normal" for in-memory tables.
|
||||
#
|
||||
if {[info exists TEMP_STORE] && $TEMP_STORE>=2} {
|
||||
set temp_mode normal
|
||||
} else {
|
||||
set temp_mode exclusive
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Test cases exclusive-1.X test the PRAGMA logic.
|
||||
#
|
||||
@ -38,7 +47,7 @@ do_test exclusive-1.0 {
|
||||
pragma main.locking_mode;
|
||||
pragma temp.locking_mode;
|
||||
}
|
||||
} {normal normal exclusive}
|
||||
} [list normal normal $temp_mode]
|
||||
do_test exclusive-1.1 {
|
||||
execsql {
|
||||
pragma locking_mode = exclusive;
|
||||
@ -50,7 +59,7 @@ do_test exclusive-1.2 {
|
||||
pragma main.locking_mode;
|
||||
pragma temp.locking_mode;
|
||||
}
|
||||
} {exclusive exclusive exclusive}
|
||||
} [list exclusive exclusive $temp_mode]
|
||||
do_test exclusive-1.3 {
|
||||
execsql {
|
||||
pragma locking_mode = normal;
|
||||
@ -62,7 +71,7 @@ do_test exclusive-1.4 {
|
||||
pragma main.locking_mode;
|
||||
pragma temp.locking_mode;
|
||||
}
|
||||
} {normal normal exclusive}
|
||||
} [list normal normal $temp_mode]
|
||||
do_test exclusive-1.5 {
|
||||
execsql {
|
||||
pragma locking_mode = invalid;
|
||||
@ -74,7 +83,7 @@ do_test exclusive-1.6 {
|
||||
pragma main.locking_mode;
|
||||
pragma temp.locking_mode;
|
||||
}
|
||||
} {normal normal exclusive}
|
||||
} [list normal normal $temp_mode]
|
||||
do_test exclusive-1.7 {
|
||||
execsql {
|
||||
pragma locking_mode = exclusive;
|
||||
@ -94,7 +103,7 @@ do_test exclusive-1.8 {
|
||||
pragma temp.locking_mode;
|
||||
pragma aux.locking_mode;
|
||||
}
|
||||
} {normal exclusive exclusive}
|
||||
} [list normal $temp_mode exclusive]
|
||||
do_test exclusive-1.9 {
|
||||
execsql {
|
||||
pragma locking_mode;
|
||||
@ -130,7 +139,7 @@ do_test exclusive-1.12 {
|
||||
pragma aux.locking_mode;
|
||||
pragma aux2.locking_mode;
|
||||
}
|
||||
} {normal exclusive normal normal}
|
||||
} [list normal $temp_mode normal normal]
|
||||
do_test exclusive-1.13 {
|
||||
execsql {
|
||||
ATTACH 'test4.db' as aux3;
|
||||
@ -142,7 +151,7 @@ do_test exclusive-1.13 {
|
||||
pragma aux2.locking_mode;
|
||||
pragma aux3.locking_mode;
|
||||
}
|
||||
} {normal exclusive normal normal normal}
|
||||
} [list normal $temp_mode normal normal normal]
|
||||
|
||||
do_test exclusive-1.99 {
|
||||
execsql {
|
||||
|
@ -12,7 +12,7 @@
|
||||
#
|
||||
# This file implements tests to verify database file format.
|
||||
#
|
||||
# $Id: filefmt.test,v 1.1 2007/04/06 15:02:14 drh Exp $
|
||||
# $Id: filefmt.test,v 1.2 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -53,10 +53,13 @@ do_test filefmt-1.4 {
|
||||
#
|
||||
ifcapable pager_pragmas {
|
||||
foreach pagesize {512 1024 2048 4096 8192 16384 32768} {
|
||||
if {[info exists SQLITE_MAX_PAGE_SIZE]
|
||||
&& $pagesize>$SQLITE_MAX_PAGE_SIZE} continue
|
||||
do_test filefmt-1.5.$pagesize.1 {
|
||||
db close
|
||||
file delete -force test.db
|
||||
sqlite3 db test.db
|
||||
db eval "PRAGMA auto_vacuum=OFF"
|
||||
db eval "PRAGMA page_size=$pagesize"
|
||||
db eval {CREATE TABLE t1(x)}
|
||||
file size test.db
|
||||
|
@ -11,11 +11,16 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this script is extension loading.
|
||||
#
|
||||
# $Id: loadext.test,v 1.8 2006/08/23 20:07:22 drh Exp $
|
||||
# $Id: loadext.test,v 1.9 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
ifcapable !load_ext {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
# The name of the test extension varies by operating system.
|
||||
#
|
||||
if {$::tcl_platform(platform) eq "windows"} {
|
||||
|
@ -12,7 +12,7 @@
|
||||
# focus of this script is automatic extension loading and the
|
||||
# sqlite3_auto_extension() API.
|
||||
#
|
||||
# $Id: loadext2.test,v 1.1 2006/08/23 20:07:22 drh Exp $
|
||||
# $Id: loadext2.test,v 1.2 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -20,6 +20,10 @@ source $testdir/tester.tcl
|
||||
# Only run these tests if the approriate APIs are defined
|
||||
# in the system under test.
|
||||
#
|
||||
ifcapable !load_ext {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
if {[info command sqlite3_auto_extension_sqr]==""} {
|
||||
finish_test
|
||||
return
|
||||
|
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this script is database locks.
|
||||
#
|
||||
# $Id: lock4.test,v 1.3 2007/04/06 18:23:19 drh Exp $
|
||||
# $Id: lock4.test,v 1.4 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
@ -20,10 +20,16 @@ source $testdir/tester.tcl
|
||||
# Initialize the test.db database so that it is non-empty
|
||||
#
|
||||
do_test lock4-1.1 {
|
||||
db eval {CREATE TABLE t1(x)}
|
||||
db eval {
|
||||
PRAGMA auto_vacuum=OFF;
|
||||
CREATE TABLE t1(x);
|
||||
}
|
||||
file delete -force test2.db test2.db-journal
|
||||
sqlite3 db2 test2.db
|
||||
db2 eval {CREATE TABLE t2(x)}
|
||||
db2 eval {
|
||||
PRAGMA auto_vacuum=OFF;
|
||||
CREATE TABLE t2(x)
|
||||
}
|
||||
db2 close
|
||||
list [file size test.db] [file size test2.db]
|
||||
} {2048 2048}
|
||||
|
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library.
|
||||
# This file implements tests for the page_size PRAGMA.
|
||||
#
|
||||
# $Id: pagesize.test,v 1.11 2006/01/17 09:35:02 danielk1977 Exp $
|
||||
# $Id: pagesize.test,v 1.12 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
@ -55,26 +55,29 @@ do_test pagesize-1.5 {
|
||||
PRAGMA page_size;
|
||||
}
|
||||
} 512
|
||||
do_test pagesize-1.6 {
|
||||
execsql {
|
||||
PRAGMA page_size=8192;
|
||||
PRAGMA page_size;
|
||||
}
|
||||
} 8192
|
||||
do_test pagesize-1.7 {
|
||||
execsql {
|
||||
PRAGMA page_size=65537;
|
||||
PRAGMA page_size;
|
||||
}
|
||||
} 8192
|
||||
do_test pagesize-1.8 {
|
||||
execsql {
|
||||
PRAGMA page_size=1234;
|
||||
PRAGMA page_size
|
||||
}
|
||||
} 8192
|
||||
|
||||
if {![info exists SQLITE_MAX_PAGE_SIZE] || $SQLITE_MAX_PAGE_SIZE>=8192} {
|
||||
do_test pagesize-1.6 {
|
||||
execsql {
|
||||
PRAGMA page_size=8192;
|
||||
PRAGMA page_size;
|
||||
}
|
||||
} 8192
|
||||
do_test pagesize-1.7 {
|
||||
execsql {
|
||||
PRAGMA page_size=65537;
|
||||
PRAGMA page_size;
|
||||
}
|
||||
} 8192
|
||||
do_test pagesize-1.8 {
|
||||
execsql {
|
||||
PRAGMA page_size=1234;
|
||||
PRAGMA page_size
|
||||
}
|
||||
} 8192
|
||||
}
|
||||
foreach PGSZ {512 2048 4096 8192} {
|
||||
if {[info exists SQLITE_MAX_PAGE_SIZE]
|
||||
&& $SQLITE_MAX_PAGE_SIZE<$PGSZ} continue
|
||||
ifcapable memorydb {
|
||||
do_test pagesize-2.$PGSZ.0 {
|
||||
db close
|
||||
|
@ -12,7 +12,7 @@
|
||||
#
|
||||
# This file implements tests for the PRAGMA command.
|
||||
#
|
||||
# $Id: pragma.test,v 1.52 2007/03/30 17:11:13 danielk1977 Exp $
|
||||
# $Id: pragma.test,v 1.53 2007/04/06 21:42:22 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -46,14 +46,17 @@ file delete test.db test.db-journal
|
||||
file delete test3.db test3.db-journal
|
||||
sqlite3 db test.db; set DB [sqlite3_connection_pointer db]
|
||||
|
||||
|
||||
ifcapable pager_pragmas {
|
||||
set DFLT_CACHE_SZ [db one {PRAGMA default_cache_size}]
|
||||
set TEMP_CACHE_SZ [db one {PRAGMA temp.default_cache_size}]
|
||||
do_test pragma-1.1 {
|
||||
execsql {
|
||||
PRAGMA cache_size;
|
||||
PRAGMA default_cache_size;
|
||||
PRAGMA synchronous;
|
||||
}
|
||||
} {2000 2000 2}
|
||||
} [list $DFLT_CACHE_SZ $DFLT_CACHE_SZ 2]
|
||||
do_test pragma-1.2 {
|
||||
execsql {
|
||||
PRAGMA synchronous=OFF;
|
||||
@ -62,7 +65,7 @@ do_test pragma-1.2 {
|
||||
PRAGMA default_cache_size;
|
||||
PRAGMA synchronous;
|
||||
}
|
||||
} {1234 2000 0}
|
||||
} [list 1234 $DFLT_CACHE_SZ 0]
|
||||
do_test pragma-1.3 {
|
||||
db close
|
||||
sqlite3 db test.db
|
||||
@ -71,7 +74,7 @@ do_test pragma-1.3 {
|
||||
PRAGMA default_cache_size;
|
||||
PRAGMA synchronous;
|
||||
}
|
||||
} {2000 2000 2}
|
||||
} [list $DFLT_CACHE_SZ $DFLT_CACHE_SZ 2]
|
||||
do_test pragma-1.4 {
|
||||
execsql {
|
||||
PRAGMA synchronous=OFF;
|
||||
@ -79,7 +82,7 @@ do_test pragma-1.4 {
|
||||
PRAGMA default_cache_size;
|
||||
PRAGMA synchronous;
|
||||
}
|
||||
} {2000 2000 0}
|
||||
} [list $DFLT_CACHE_SZ $DFLT_CACHE_SZ 0]
|
||||
do_test pragma-1.5 {
|
||||
execsql {
|
||||
PRAGMA cache_size=4321;
|
||||
@ -87,7 +90,7 @@ do_test pragma-1.5 {
|
||||
PRAGMA default_cache_size;
|
||||
PRAGMA synchronous;
|
||||
}
|
||||
} {4321 2000 0}
|
||||
} [list 4321 $DFLT_CACHE_SZ 0]
|
||||
do_test pragma-1.6 {
|
||||
execsql {
|
||||
PRAGMA synchronous=ON;
|
||||
@ -95,7 +98,7 @@ do_test pragma-1.6 {
|
||||
PRAGMA default_cache_size;
|
||||
PRAGMA synchronous;
|
||||
}
|
||||
} {4321 2000 1}
|
||||
} [list 4321 $DFLT_CACHE_SZ 1]
|
||||
do_test pragma-1.7 {
|
||||
db close
|
||||
sqlite3 db test.db
|
||||
@ -104,7 +107,7 @@ do_test pragma-1.7 {
|
||||
PRAGMA default_cache_size;
|
||||
PRAGMA synchronous;
|
||||
}
|
||||
} {2000 2000 2}
|
||||
} [list $DFLT_CACHE_SZ $DFLT_CACHE_SZ 2]
|
||||
do_test pragma-1.8 {
|
||||
execsql {
|
||||
PRAGMA default_cache_size=123;
|
||||
@ -237,7 +240,11 @@ do_test pragma-2.4 {
|
||||
# These tests won't work if the database is encrypted
|
||||
#
|
||||
do_test pragma-3.1 {
|
||||
db close
|
||||
file delete -force test.db test.db-journal
|
||||
sqlite3 db test.db
|
||||
execsql {
|
||||
PRAGMA auto_vacuum=OFF;
|
||||
BEGIN;
|
||||
CREATE TABLE t2(a,b,c);
|
||||
CREATE INDEX i2 ON t2(a);
|
||||
@ -401,17 +408,18 @@ do_test pragma-3.99 {
|
||||
ifcapable pager_pragmas {
|
||||
do_test pragma-4.1 {
|
||||
execsql {
|
||||
ATTACH 'test2.db' AS aux;
|
||||
pragma aux.cache_size;
|
||||
pragma aux.default_cache_size;
|
||||
}
|
||||
} {2000 2000}
|
||||
} [list $DFLT_CACHE_SZ $DFLT_CACHE_SZ]
|
||||
do_test pragma-4.2 {
|
||||
execsql {
|
||||
pragma aux.cache_size = 50;
|
||||
pragma aux.cache_size;
|
||||
pragma aux.default_cache_size;
|
||||
}
|
||||
} {50 2000}
|
||||
} [list 50 $DFLT_CACHE_SZ]
|
||||
do_test pragma-4.3 {
|
||||
execsql {
|
||||
pragma aux.default_cache_size = 456;
|
||||
@ -424,7 +432,7 @@ do_test pragma-4.4 {
|
||||
pragma cache_size;
|
||||
pragma default_cache_size;
|
||||
}
|
||||
} {123 123}
|
||||
} [list $DFLT_CACHE_SZ $DFLT_CACHE_SZ]
|
||||
do_test pragma-4.5 {
|
||||
execsql {
|
||||
DETACH aux;
|
||||
@ -432,7 +440,7 @@ do_test pragma-4.5 {
|
||||
pragma aux.cache_size;
|
||||
pragma aux.default_cache_size;
|
||||
}
|
||||
} {2000 2000}
|
||||
} [list $DFLT_CACHE_SZ $DFLT_CACHE_SZ]
|
||||
do_test pragma-4.6 {
|
||||
execsql {
|
||||
DETACH aux;
|
||||
@ -837,24 +845,25 @@ do_test pragma-9.8 {
|
||||
PRAGMA temp_store_directory='';
|
||||
}
|
||||
} {}
|
||||
ifcapable tempdb {
|
||||
do_test pragma-9.9 {
|
||||
execsql {
|
||||
PRAGMA temp_store_directory;
|
||||
PRAGMA temp_store=FILE;
|
||||
CREATE TEMP TABLE temp_store_directory_test(a integer);
|
||||
INSERT INTO temp_store_directory_test values (2);
|
||||
SELECT * FROM temp_store_directory_test;
|
||||
}
|
||||
} {2}
|
||||
}
|
||||
do_test pragma-9.10 {
|
||||
catchsql "
|
||||
PRAGMA temp_store_directory='$pwd';
|
||||
SELECT * FROM temp_store_directory_test;
|
||||
"
|
||||
} {1 {no such table: temp_store_directory_test}}
|
||||
|
||||
if {![info exists TEMP_STORE] || $TEMP_STORE<=1} {
|
||||
ifcapable tempdb {
|
||||
do_test pragma-9.9 {
|
||||
execsql {
|
||||
PRAGMA temp_store_directory;
|
||||
PRAGMA temp_store=FILE;
|
||||
CREATE TEMP TABLE temp_store_directory_test(a integer);
|
||||
INSERT INTO temp_store_directory_test values (2);
|
||||
SELECT * FROM temp_store_directory_test;
|
||||
}
|
||||
} {2}
|
||||
do_test pragma-9.10 {
|
||||
catchsql "
|
||||
PRAGMA temp_store_directory='$pwd';
|
||||
SELECT * FROM temp_store_directory_test;
|
||||
"
|
||||
} {1 {no such table: temp_store_directory_test}}
|
||||
}
|
||||
}
|
||||
do_test pragma-9.11 {
|
||||
execsql {
|
||||
PRAGMA temp_store = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user