mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Changes to test scripts so that veryquick.test runs with SQLITE_TEMP_STORE=3 defined. Also a fix to stop the same switch causing a crash in the savepoint code. (CVS 6053)
FossilOrigin-Name: ee0e6eae9f984472e44d7ee8f195c6e5d33f2efd
This commit is contained in:
16
manifest
16
manifest
@ -1,5 +1,5 @@
|
||||
C Add\sa\scase\sto\spermutations.test\sto\srun\stests\swith\sthe\stest_journal.c\sbackend\sinstalled.\sAlso\smany\sfixes\sto\stest_journal.c\sand\sone\squite\sobscure\sfix\sto\spager.c.\s(CVS\s6052)
|
||||
D 2008-12-22T10:58:46
|
||||
C Changes\sto\stest\sscripts\sso\sthat\sveryquick.test\sruns\swith\sSQLITE_TEMP_STORE=3\sdefined.\sAlso\sa\sfix\sto\sstop\sthe\ssame\sswitch\scausing\sa\scrash\sin\sthe\ssavepoint\scode.\s(CVS\s6053)
|
||||
D 2008-12-22T11:43:36
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 77635d0909c2067cee03889a1e04ce910d8fb809
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -142,7 +142,7 @@ F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60
|
||||
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
|
||||
F src/os_unix.c e6eacc7ec735ded605fefcbaf250058baa8feb12
|
||||
F src/os_win.c 496e3ceb499aedc63622a89ef76f7af2dd902709
|
||||
F src/pager.c 4fc24d29d699c00169a129fa6835a1ea31598873
|
||||
F src/pager.c 59b87841ac6ea5f6e5023f2321b69572b9883a8b
|
||||
F src/pager.h 7191294438881eb4d13eedade97891e8dc993905
|
||||
F src/parse.y 4d0e33a702dc3ea7b69d8ae1914b3fbd32e46057
|
||||
F src/pcache.c 16dc8da6e6ba6250f8dfd9ee46036db1cbceedc6
|
||||
@ -305,7 +305,7 @@ F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea
|
||||
F test/enc2.test 6d91a5286f59add0cfcbb2d0da913b76f2242398
|
||||
F test/enc3.test 5c550d59ff31dccdba5d1a02ae11c7047d77c041
|
||||
F test/eval.test bc269c365ba877554948441e91ad5373f9f91be3
|
||||
F test/exclusive.test ecc64c394f5086d02159d8c0a82520f11420cf6a
|
||||
F test/exclusive.test cb991e44aa7cf744976143afce18586920f6696a
|
||||
F test/exclusive2.test 6bdf254770a843c2933b54bee9ed239934f0a183
|
||||
F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7
|
||||
F test/expr.test 135ed46c049916688171e618c5c14312811618d4
|
||||
@ -411,7 +411,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 c4e4e40afdb6a128957e1f8ee404c8d670c4ce6f
|
||||
F test/jrnlmode.test 513b495624bfe54da24ae1208125421d8167953d
|
||||
F test/lastinsert.test 474d519c68cb79d07ecae56a763aa7f322c72f51
|
||||
F test/laststmtchanges.test ae613f53819206b3222771828d024154d51db200
|
||||
F test/like.test fef924922828d5a2a5bff80b9bdd9ff57a1ca500
|
||||
@ -684,7 +684,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P d9595b961800a13c141bebdb8c0a67377f30efad
|
||||
R b5374e09d172c2ab41305c978396d82d
|
||||
P bb177e3072ab61d0af7af91660ebe4dafa487b42
|
||||
R 848b232f02845492e2937b3a6e6c7ff8
|
||||
U danielk1977
|
||||
Z 98d2c97eeee17c8939e3e7380b43abd8
|
||||
Z 297d4aaaf79becd658366040aca809fd
|
||||
|
@ -1 +1 @@
|
||||
bb177e3072ab61d0af7af91660ebe4dafa487b42
|
||||
ee0e6eae9f984472e44d7ee8f195c6e5d33f2efd
|
@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.520 2008/12/22 10:58:46 danielk1977 Exp $
|
||||
** @(#) $Id: pager.c,v 1.521 2008/12/22 11:43:36 danielk1977 Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@ -4008,7 +4008,7 @@ int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){
|
||||
}
|
||||
pPager->nSavepoint = nNew;
|
||||
|
||||
if( op==SAVEPOINT_ROLLBACK ){
|
||||
if( op==SAVEPOINT_ROLLBACK && pPager->jfd->pMethods ){
|
||||
PagerSavepoint *pSavepoint = (nNew==0)?0:&pPager->aSavepoint[nNew-1];
|
||||
rc = pagerPlaybackSavepoint(pPager, pSavepoint);
|
||||
assert(rc!=SQLITE_DONE);
|
||||
|
@ -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.10 2008/11/21 00:10:35 aswift Exp $
|
||||
# $Id: exclusive.test,v 1.11 2008/12/22 11:43:36 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -29,15 +29,6 @@ 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.
|
||||
#
|
||||
@ -47,7 +38,7 @@ do_test exclusive-1.0 {
|
||||
pragma main.locking_mode;
|
||||
pragma temp.locking_mode;
|
||||
}
|
||||
} [list normal normal $temp_mode]
|
||||
} [list normal normal exclusive]
|
||||
do_test exclusive-1.1 {
|
||||
execsql {
|
||||
pragma locking_mode = exclusive;
|
||||
@ -59,7 +50,7 @@ do_test exclusive-1.2 {
|
||||
pragma main.locking_mode;
|
||||
pragma temp.locking_mode;
|
||||
}
|
||||
} [list exclusive exclusive $temp_mode]
|
||||
} [list exclusive exclusive exclusive]
|
||||
do_test exclusive-1.3 {
|
||||
execsql {
|
||||
pragma locking_mode = normal;
|
||||
@ -71,7 +62,7 @@ do_test exclusive-1.4 {
|
||||
pragma main.locking_mode;
|
||||
pragma temp.locking_mode;
|
||||
}
|
||||
} [list normal normal $temp_mode]
|
||||
} [list normal normal exclusive]
|
||||
do_test exclusive-1.5 {
|
||||
execsql {
|
||||
pragma locking_mode = invalid;
|
||||
@ -83,7 +74,7 @@ do_test exclusive-1.6 {
|
||||
pragma main.locking_mode;
|
||||
pragma temp.locking_mode;
|
||||
}
|
||||
} [list normal normal $temp_mode]
|
||||
} [list normal normal exclusive]
|
||||
ifcapable attach {
|
||||
do_test exclusive-1.7 {
|
||||
execsql {
|
||||
@ -104,7 +95,7 @@ ifcapable attach {
|
||||
pragma temp.locking_mode;
|
||||
pragma aux.locking_mode;
|
||||
}
|
||||
} [list normal $temp_mode exclusive]
|
||||
} [list normal exclusive exclusive]
|
||||
do_test exclusive-1.9 {
|
||||
execsql {
|
||||
pragma locking_mode;
|
||||
@ -140,7 +131,7 @@ ifcapable attach {
|
||||
pragma aux.locking_mode;
|
||||
pragma aux2.locking_mode;
|
||||
}
|
||||
} [list normal $temp_mode normal normal]
|
||||
} [list normal exclusive normal normal]
|
||||
do_test exclusive-1.13 {
|
||||
execsql {
|
||||
ATTACH 'test4.db' as aux3;
|
||||
@ -152,7 +143,7 @@ ifcapable attach {
|
||||
pragma aux2.locking_mode;
|
||||
pragma aux3.locking_mode;
|
||||
}
|
||||
} [list normal $temp_mode normal normal normal]
|
||||
} [list normal exclusive normal normal normal]
|
||||
|
||||
do_test exclusive-1.99 {
|
||||
execsql {
|
||||
|
@ -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.8 2008/11/10 19:24:38 shane Exp $
|
||||
# $Id: jrnlmode.test,v 1.9 2008/12/22 11:43:36 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -21,6 +21,18 @@ ifcapable {!pager_pragmas} {
|
||||
return
|
||||
}
|
||||
|
||||
if {[info exists TEMP_STORE] && $TEMP_STORE>=2} {
|
||||
set temp_persist memory
|
||||
set temp_delete memory
|
||||
set temp_truncate memory
|
||||
set temp_off memory
|
||||
} else {
|
||||
set temp_persist persist
|
||||
set temp_delete delete
|
||||
set temp_truncate truncate
|
||||
set temp_off off
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Test cases jrnlmode-1.X test the PRAGMA logic.
|
||||
#
|
||||
@ -30,7 +42,7 @@ do_test jrnlmode-1.0 {
|
||||
PRAGMA main.journal_mode;
|
||||
PRAGMA temp.journal_mode;
|
||||
}
|
||||
} [list delete delete delete]
|
||||
} [list delete delete $temp_delete]
|
||||
do_test jrnlmode-1.1 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = persist;
|
||||
@ -42,7 +54,7 @@ do_test jrnlmode-1.2 {
|
||||
PRAGMA main.journal_mode;
|
||||
PRAGMA temp.journal_mode;
|
||||
}
|
||||
} [list persist persist persist]
|
||||
} [list persist persist $temp_persist]
|
||||
do_test jrnlmode-1.4 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = off;
|
||||
@ -54,7 +66,7 @@ do_test jrnlmode-1.5 {
|
||||
PRAGMA main.journal_mode;
|
||||
PRAGMA temp.journal_mode;
|
||||
}
|
||||
} {off off off}
|
||||
} [list off off $temp_off]
|
||||
do_test jrnlmode-1.6 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = delete;
|
||||
@ -66,7 +78,7 @@ do_test jrnlmode-1.7 {
|
||||
PRAGMA main.journal_mode;
|
||||
PRAGMA temp.journal_mode;
|
||||
}
|
||||
} {delete delete delete}
|
||||
} [list delete delete $temp_delete]
|
||||
do_test jrnlmode-1.7.1 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = truncate;
|
||||
@ -78,7 +90,7 @@ do_test jrnlmode-1.7.2 {
|
||||
PRAGMA main.journal_mode;
|
||||
PRAGMA temp.journal_mode;
|
||||
}
|
||||
} {truncate truncate truncate}
|
||||
} [list truncate truncate $temp_truncate]
|
||||
do_test jrnlmode-1.8 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = off;
|
||||
@ -105,7 +117,7 @@ ifcapable attach {
|
||||
PRAGMA temp.journal_mode;
|
||||
PRAGMA aux1.journal_mode;
|
||||
}
|
||||
} {off persist memory}
|
||||
} [list off $temp_persist memory]
|
||||
do_test jrnlmode-1.11 {
|
||||
execsql {
|
||||
PRAGMA journal_mode;
|
||||
@ -142,7 +154,7 @@ ifcapable attach {
|
||||
PRAGMA aux1.journal_mode;
|
||||
PRAGMA aux2.journal_mode;
|
||||
}
|
||||
} {delete delete memory memory}
|
||||
} [list delete $temp_delete memory memory]
|
||||
do_test jrnlmode-1.15 {
|
||||
execsql {
|
||||
ATTACH ':memory:' as aux3;
|
||||
@ -154,7 +166,7 @@ ifcapable attach {
|
||||
PRAGMA aux2.journal_mode;
|
||||
PRAGMA aux3.journal_mode;
|
||||
}
|
||||
} {delete delete memory memory memory}
|
||||
} [list delete $temp_delete memory memory memory]
|
||||
do_test jrnlmode-1.16 {
|
||||
execsql {
|
||||
PRAGMA journal_mode = TRUNCATE;
|
||||
@ -166,7 +178,7 @@ ifcapable attach {
|
||||
PRAGMA aux2.journal_mode;
|
||||
PRAGMA aux3.journal_mode;
|
||||
}
|
||||
} {truncate truncate memory memory memory}
|
||||
} [list truncate $temp_truncate memory memory memory]
|
||||
|
||||
do_test jrnlmode-1.99 {
|
||||
execsql {
|
||||
|
Reference in New Issue
Block a user