Changes to jrnlmode.test to account for in-memory temp databases. (CVS 6483)
FossilOrigin-Name: c31d4359ae056dca9e9de61ef8ceb683b92850e7
This commit is contained in:
parent
73d34e92f4
commit
d0f1958682
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Simplifications\sand\sadditional\scomments\son\sthe\ssqlite3_get_table()\nimplementation.\s\sChanges\sto\sfacilitate\sfull\sbranch\stest\scoverage.\s(CVS\s6482)
|
||||
D 2009-04-10T14:28:00
|
||||
C Changes\sto\sjrnlmode.test\sto\saccount\sfor\sin-memory\stemp\sdatabases.\s(CVS\s6483)
|
||||
D 2009-04-10T15:02:44
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -420,7 +420,7 @@ F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
|
||||
F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
|
||||
F test/join5.test 86675fc2919269aa923c84dd00ee4249b97990fe
|
||||
F test/journal1.test 36f2d1bb9bf03f790f43fbdb439e44c0657fab19
|
||||
F test/jrnlmode.test 887daf941f3b03f8a19b4bf8fc603c51c1ea37ff
|
||||
F test/jrnlmode.test 05e1e187c5b64022e832761674ee2395f3267d01
|
||||
F test/jrnlmode2.test bd846e10d463c0b6f8bded674cb07f94a0277097
|
||||
F test/keyword1.test a2400977a2e4fde43bf33754c2929fda34dbca05
|
||||
F test/lastinsert.test 474d519c68cb79d07ecae56a763aa7f322c72f51
|
||||
@ -717,7 +717,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P 683e4bd74783e6e3f6cf75f9582008c7b7e02a01
|
||||
R 65240198d5802c3e7624e2bd2d3785c6
|
||||
U drh
|
||||
Z e03e042fa6bf5790b1eb4d8b0880d63a
|
||||
P 57e3e6b3cb54e6626bee41a084c927ee264b6d03
|
||||
R 128b04f123dcbb16ad4c13e86f0b3e91
|
||||
U danielk1977
|
||||
Z 11aa570c8f3f375f7871c54c56c05b7d
|
||||
|
@ -1 +1 @@
|
||||
57e3e6b3cb54e6626bee41a084c927ee264b6d03
|
||||
c31d4359ae056dca9e9de61ef8ceb683b92850e7
|
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The focus
|
||||
# of these tests is the journal mode pragma.
|
||||
#
|
||||
# $Id: jrnlmode.test,v 1.13 2009/04/04 16:02:32 drh Exp $
|
||||
# $Id: jrnlmode.test,v 1.14 2009/04/10 15:02:44 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -25,7 +25,7 @@ if {[info exists TEMP_STORE] && $TEMP_STORE>=2} {
|
||||
set temp_persist memory
|
||||
set temp_delete memory
|
||||
set temp_truncate memory
|
||||
set temp_off memory
|
||||
set temp_off off
|
||||
} else {
|
||||
set temp_persist persist
|
||||
set temp_delete delete
|
||||
@ -33,6 +33,16 @@ if {[info exists TEMP_STORE] && $TEMP_STORE>=2} {
|
||||
set temp_off off
|
||||
}
|
||||
|
||||
proc temp_journal_mode {newmode} {
|
||||
if {[info exists ::TEMP_STORE] && $::TEMP_STORE>=2} {
|
||||
if {$newmode ne "off" && $newmode ne "memory"} {
|
||||
execsql {PRAGMA temp.journal_mode}
|
||||
set newmode [db one {PRAGMA temp.journal_mode}]
|
||||
}
|
||||
}
|
||||
set newmode
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Test cases jrnlmode-1.X test the PRAGMA logic.
|
||||
#
|
||||
@ -42,7 +52,7 @@ do_test jrnlmode-1.0 {
|
||||
PRAGMA main.journal_mode;
|
||||
PRAGMA temp.journal_mode;
|
||||
}
|
||||
} [list delete delete $temp_delete]
|
||||
} [list delete delete [temp_journal_mode delete]]
|
||||
do_test jrnlmode-1.1 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = persist;
|
||||
@ -54,7 +64,7 @@ do_test jrnlmode-1.2 {
|
||||
PRAGMA main.journal_mode;
|
||||
PRAGMA temp.journal_mode;
|
||||
}
|
||||
} [list persist persist $temp_persist]
|
||||
} [list persist persist [temp_journal_mode persist]]
|
||||
do_test jrnlmode-1.4 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = off;
|
||||
@ -66,7 +76,7 @@ do_test jrnlmode-1.5 {
|
||||
PRAGMA main.journal_mode;
|
||||
PRAGMA temp.journal_mode;
|
||||
}
|
||||
} [list off off $temp_off]
|
||||
} [list off off [temp_journal_mode off]]
|
||||
do_test jrnlmode-1.6 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = delete;
|
||||
@ -76,9 +86,9 @@ do_test jrnlmode-1.7 {
|
||||
execsql {
|
||||
PRAGMA journal_mode;
|
||||
PRAGMA main.journal_mode;
|
||||
PRAGMA temp.journal_mode;
|
||||
PRAGMA Temp.journal_mode;
|
||||
}
|
||||
} [list delete delete $temp_delete]
|
||||
} [list delete delete [temp_journal_mode delete]]
|
||||
do_test jrnlmode-1.7.1 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = truncate;
|
||||
@ -90,7 +100,7 @@ do_test jrnlmode-1.7.2 {
|
||||
PRAGMA main.journal_mode;
|
||||
PRAGMA temp.journal_mode;
|
||||
}
|
||||
} [list truncate truncate $temp_truncate]
|
||||
} [list truncate truncate [temp_journal_mode truncate]]
|
||||
do_test jrnlmode-1.8 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = off;
|
||||
@ -117,7 +127,7 @@ ifcapable attach {
|
||||
PRAGMA temp.journal_mode;
|
||||
PRAGMA aux1.journal_mode;
|
||||
}
|
||||
} [list off $temp_persist memory]
|
||||
} [list off [temp_journal_mode persist] memory]
|
||||
do_test jrnlmode-1.11 {
|
||||
execsql {
|
||||
PRAGMA journal_mode;
|
||||
@ -154,7 +164,7 @@ ifcapable attach {
|
||||
PRAGMA aux1.journal_mode;
|
||||
PRAGMA aux2.journal_mode;
|
||||
}
|
||||
} [list delete $temp_delete memory memory]
|
||||
} [list delete [temp_journal_mode delete] memory memory]
|
||||
do_test jrnlmode-1.15 {
|
||||
execsql {
|
||||
ATTACH ':memory:' as aux3;
|
||||
@ -166,7 +176,7 @@ ifcapable attach {
|
||||
PRAGMA aux2.journal_mode;
|
||||
PRAGMA aux3.journal_mode;
|
||||
}
|
||||
} [list delete $temp_delete memory memory memory]
|
||||
} [list delete [temp_journal_mode delete] memory memory memory]
|
||||
do_test jrnlmode-1.16 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = TRUNCATE;
|
||||
@ -178,7 +188,7 @@ ifcapable attach {
|
||||
PRAGMA aux2.journal_mode;
|
||||
PRAGMA aux3.journal_mode;
|
||||
}
|
||||
} [list truncate $temp_truncate memory memory memory]
|
||||
} [list truncate [temp_journal_mode truncate] memory memory memory]
|
||||
|
||||
do_test jrnlmode-1.99 {
|
||||
execsql {
|
||||
|
Loading…
x
Reference in New Issue
Block a user