1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Test case fixes for fulltest. (CVS 4329)

FossilOrigin-Name: cddce4950569ac49c1a5224b200b00dcd83a2ba4
This commit is contained in:
drh
2007-08-30 02:26:53 +00:00
parent fb98264aab
commit c1a7f94098
4 changed files with 37 additions and 31 deletions

View File

@ -1,5 +1,5 @@
C Fix\sfor\sthe\ssqlite3AbortOtherActiveVdbes()\sproblem.\s(CVS\s4328) C Test\scase\sfixes\sfor\sfulltest.\s(CVS\s4329)
D 2007-08-30T01:19:59 D 2007-08-30T02:26:54
F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3 F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -387,7 +387,7 @@ F test/quick.test 88844a19f6d9dc5c990e01c7dd611d33d022a1c1
F test/quote.test 215897dbe8de1a6f701265836d6601cc6ed103e6 F test/quote.test 215897dbe8de1a6f701265836d6601cc6ed103e6
F test/rdonly.test b34db316525440d3b42c32e83942c02c37d28ef0 F test/rdonly.test b34db316525440d3b42c32e83942c02c37d28ef0
F test/reindex.test 38b138abe36bf9a08c791ed44d9f76cd6b97b78b F test/reindex.test 38b138abe36bf9a08c791ed44d9f76cd6b97b78b
F test/rollback.test 673cd8c44c685ad54987fe7f0eeba84efa09685d F test/rollback.test ee0bbe2b5bf30aba3e6eeb50a2a7e475ac79eb70
F test/rowid.test d125991eea1ffdea800d48471afd8fc4acc10b01 F test/rowid.test d125991eea1ffdea800d48471afd8fc4acc10b01
F test/safety.test 4a06934e45d03b8b50ebcd8d174eb0367d2fd851 F test/safety.test 4a06934e45d03b8b50ebcd8d174eb0367d2fd851
F test/schema.test 401585200727464ef6bb0b3ba0f085f99a87cdce F test/schema.test 401585200727464ef6bb0b3ba0f085f99a87cdce
@ -403,7 +403,7 @@ F test/server1.test f5b790d4c0498179151ca8a7715a65a7802c859c
F test/shared.test 08b30d5f1939efff0517e7ff8ec7b74ad31c151b F test/shared.test 08b30d5f1939efff0517e7ff8ec7b74ad31c151b
F test/shared2.test 0ee9de8964d70e451936a48c41cb161d9134ccf4 F test/shared2.test 0ee9de8964d70e451936a48c41cb161d9134ccf4
F test/shared3.test 01e3e124dbb3859788aabc7cfb82f7ea04421749 F test/shared3.test 01e3e124dbb3859788aabc7cfb82f7ea04421749
F test/shared_err.test 494a24f6ba5994d4e4e8fe57ce8c6253e545409a F test/shared_err.test ae8ba4ccca50e742c1b5fdbd504a2a0f3b3e67dd
F test/soak.test 64f9b27fbcdec43335a88c546ce1983e6ba40d7b F test/soak.test 64f9b27fbcdec43335a88c546ce1983e6ba40d7b
F test/softheap1.test 0c49aa6eee25e7d32943e85e8d1f20eff566b1dc F test/softheap1.test 0c49aa6eee25e7d32943e85e8d1f20eff566b1dc
F test/sort.test 0e4456e729e5a92a625907c63dcdedfbe72c5dc5 F test/sort.test 0e4456e729e5a92a625907c63dcdedfbe72c5dc5
@ -567,7 +567,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P 35cb63ecfd9d8ca7304aae1b150ee5d1c3498bde P e40d40a5d41c491bef852a92e5846b273b206909
R 29b78abcd06801b9626610a433b86a61 R c839fab02b445dc9c276b91a0eebee5f
U drh U drh
Z 1ee4e75dc5784f54890a8213aed8fba0 Z 319e3e5c3c386bc32b0490ba9c2b3ff7

View File

@ -1 +1 @@
e40d40a5d41c491bef852a92e5846b273b206909 cddce4950569ac49c1a5224b200b00dcd83a2ba4

View File

@ -13,7 +13,7 @@
# caused by an ON CONFLICT ROLLBACK clause aborts any other pending # caused by an ON CONFLICT ROLLBACK clause aborts any other pending
# statements. # statements.
# #
# $Id: rollback.test,v 1.4 2006/01/17 09:35:02 danielk1977 Exp $ # $Id: rollback.test,v 1.5 2007/08/30 02:26:54 drh Exp $
set testdir [file dirname $argv0] set testdir [file dirname $argv0]
source $testdir/tester.tcl source $testdir/tester.tcl
@ -58,16 +58,17 @@ ifcapable conflict {
# Try to continue with the SELECT statement # Try to continue with the SELECT statement
# #
btree_breakpoint
do_test rollback-1.5 { do_test rollback-1.5 {
sqlite3_step $STMT sqlite3_step $STMT
} {SQLITE_ABORT} } {SQLITE_ERROR}
} }
# Restart the SELECT statement # Restart the SELECT statement
# #
do_test rollback-1.6 { do_test rollback-1.6 {
sqlite3_reset $STMT sqlite3_reset $STMT
} {SQLITE_OK} } {SQLITE_ABORT}
do_test rollback-1.7 { do_test rollback-1.7 {
sqlite3_step $STMT sqlite3_step $STMT
} {SQLITE_ROW} } {SQLITE_ROW}

View File

@ -13,7 +13,7 @@
# cache context. What happens to connection B if one connection A encounters # cache context. What happens to connection B if one connection A encounters
# an IO-error whilst reading or writing the file-system? # an IO-error whilst reading or writing the file-system?
# #
# $Id: shared_err.test,v 1.14 2007/08/28 23:28:09 drh Exp $ # $Id: shared_err.test,v 1.15 2007/08/30 02:26:54 drh Exp $
proc skip {args} {} proc skip {args} {}
@ -202,7 +202,7 @@ do_ioerr_test shared_ioerr-3 -tclprep {
expr { expr {
($::steprc eq "SQLITE_ROW" && $::finalrc eq "SQLITE_OK") || ($::steprc eq "SQLITE_ROW" && $::finalrc eq "SQLITE_OK") ||
($::steprc eq "SQLITE_ERROR" && $::finalrc eq "SQLITE_IOERR") || ($::steprc eq "SQLITE_ERROR" && $::finalrc eq "SQLITE_IOERR") ||
($::steprc eq "SQLITE_ABORT" && $::finalrc eq "SQLITE_OK") ($::steprc eq "SQLITE_ERROR" && $::finalrc eq "SQLITE_ABORT")
} }
} {1} } {1}
@ -282,7 +282,7 @@ do_ioerr_test shared_ioerr-3rev -tclprep {
expr { expr {
($::steprc eq "SQLITE_ROW" && $::finalrc eq "SQLITE_OK") || ($::steprc eq "SQLITE_ROW" && $::finalrc eq "SQLITE_OK") ||
($::steprc eq "SQLITE_ERROR" && $::finalrc eq "SQLITE_IOERR") || ($::steprc eq "SQLITE_ERROR" && $::finalrc eq "SQLITE_IOERR") ||
($::steprc eq "SQLITE_ABORT" && $::finalrc eq "SQLITE_OK") ($::steprc eq "SQLITE_ERROR" && $::finalrc eq "SQLITE_ABORT")
} }
} {1} } {1}
@ -292,7 +292,7 @@ do_ioerr_test shared_ioerr-3rev -tclprep {
# Only run these tests if memory debugging is turned on. # Only run these tests if memory debugging is turned on.
# #
if {[info command sqlite_malloc_stat]==""} { ifcapable !memdebug {
puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..." puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
db close db close
sqlite3_enable_shared_cache $::enable_shared_cache sqlite3_enable_shared_cache $::enable_shared_cache
@ -309,7 +309,7 @@ if {[info command sqlite_malloc_stat]==""} {
# owns the cursor (the one for which the position is not saved) should # owns the cursor (the one for which the position is not saved) should
# continue unaffected. # continue unaffected.
# #
do_malloc_test 4 -tclprep { do_malloc_test shared_err-4 -tclprep {
sqlite3 db2 test.db sqlite3 db2 test.db
execsql { execsql {
PRAGMA read_uncommitted = 1; PRAGMA read_uncommitted = 1;
@ -333,7 +333,7 @@ do_malloc_test 4 -tclprep {
} -cleanup { } -cleanup {
do_test shared_malloc-4.$::n.cleanup.1 { do_test shared_malloc-4.$::n.cleanup.1 {
set ::rc [sqlite3_step $::STMT] set ::rc [sqlite3_step $::STMT]
expr {$::rc=="SQLITE_ROW" || $::rc=="SQLITE_ABORT"} expr {$::rc=="SQLITE_ROW" || $::rc=="SQLITE_ERROR"}
} {1} } {1}
if {$::rc=="SQLITE_ROW"} { if {$::rc=="SQLITE_ROW"} {
do_test shared_malloc-4.$::n.cleanup.2 { do_test shared_malloc-4.$::n.cleanup.2 {
@ -341,13 +341,15 @@ do_malloc_test 4 -tclprep {
} {2222222222} } {2222222222}
} }
do_test shared_malloc-4.$::n.cleanup.3 { do_test shared_malloc-4.$::n.cleanup.3 {
sqlite3_finalize $::STMT set rc [sqlite3_finalize $::STMT]
} {SQLITE_OK} expr {$rc=="SQLITE_OK" || $rc=="SQLITE_ABORT" || $rc=="SQLITE_NOMEM"}
} {1}
# db2 eval {select * from sqlite_master} # db2 eval {select * from sqlite_master}
db2 close db2 close
} }
do_malloc_test 5 -tclbody { do_malloc_test shared_err-5 -tclbody {
db close
sqlite3 dbX test.db sqlite3 dbX test.db
sqlite3 dbY test.db sqlite3 dbY test.db
dbX close dbX close
@ -357,7 +359,7 @@ do_malloc_test 5 -tclbody {
catch {dbY close} catch {dbY close}
} }
do_malloc_test 6 -tclbody { do_malloc_test shared_err-6 -tclbody {
catch {db close} catch {db close}
sqlite3_thread_cleanup sqlite3_thread_cleanup
sqlite3_enable_shared_cache 0 sqlite3_enable_shared_cache 0
@ -365,13 +367,15 @@ do_malloc_test 6 -tclbody {
sqlite3_enable_shared_cache 1 sqlite3_enable_shared_cache 1
} }
do_test shared_misuse-7.1 { # As of 3.5.0, sqlite3_enable_shared_cache can be called at
sqlite3 db test.db # any time and from any thread
catch { #do_test shared_err-misuse-7.1 {
sqlite3_enable_shared_cache 0 # sqlite3 db test.db
} msg # catch {
set msg # sqlite3_enable_shared_cache 0
} {library routine called out of sequence} # } msg
# set msg
#} {library routine called out of sequence}
# Again provoke a malloc() failure when a cursor position is being saved, # Again provoke a malloc() failure when a cursor position is being saved,
# this time during a ROLLBACK operation by some other handle. # this time during a ROLLBACK operation by some other handle.
@ -381,7 +385,7 @@ do_test shared_misuse-7.1 {
# be aborted. # be aborted.
# #
set ::aborted 0 set ::aborted 0
do_malloc_test 8 -tclprep { do_malloc_test shared_err-8 -tclprep {
sqlite3 db2 test.db sqlite3 db2 test.db
execsql { execsql {
PRAGMA read_uncommitted = 1; PRAGMA read_uncommitted = 1;
@ -413,12 +417,13 @@ do_malloc_test 8 -tclprep {
do_test shared_malloc-8.$::n.cleanup.2 { do_test shared_malloc-8.$::n.cleanup.2 {
set rc1 [sqlite3_step $::STMT] set rc1 [sqlite3_step $::STMT]
set rc2 [sqlite3_finalize $::STMT] set rc2 [sqlite3_finalize $::STMT]
if {$rc1=="SQLITE_ABORT"} { if {$rc2=="SQLITE_ABORT"} {
incr ::aborted incr ::aborted
} }
expr { expr {
($rc1=="SQLITE_DONE" && $rc2=="SQLITE_OK") || ($rc1=="SQLITE_DONE" && $rc2=="SQLITE_OK") ||
($rc1=="SQLITE_ABORT" && $rc2=="SQLITE_OK") ($rc1=="SQLITE_ERROR" && $rc2=="SQLITE_ABORT") ||
($rc1=="SQLITE_ERROR" && $rc2=="SQLITE_NOMEM")
} }
} {1} } {1}
db2 close db2 close