From 11f71d6ae48679684a1e14ce4f768402bab2ed39 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 15 May 2013 18:34:17 +0000 Subject: [PATCH 1/8] Fixes to allow testfixture to be compiled with SQLITE_OMIT_VIRTUAL_TABLE defined. FossilOrigin-Name: 00231fb0127960d700de3549e34e82f8ec1b5819 --- ext/misc/amatch.c | 6 ++++++ ext/misc/closure.c | 6 ++++++ ext/misc/fuzzer.c | 2 ++ ext/misc/spellfix.c | 7 +++++++ manifest | 24 ++++++++++++------------ manifest.uuid | 2 +- test/closure01.test | 2 ++ test/wal.test | 3 +-- 8 files changed, 37 insertions(+), 15 deletions(-) diff --git a/ext/misc/amatch.c b/ext/misc/amatch.c index f91c84f06e..b61308054e 100644 --- a/ext/misc/amatch.c +++ b/ext/misc/amatch.c @@ -164,6 +164,8 @@ SQLITE_EXTENSION_INIT1 #include #include +#ifndef SQLITE_OMIT_VIRTUALTABLE + /* ** Forward declaration of objects used by this implementation */ @@ -1458,6 +1460,8 @@ static sqlite3_module amatchModule = { 0 /* xRollbackTo */ }; +#endif /* SQLITE_OMIT_VIRTUALTABLE */ + /* ** Register the amatch virtual table */ @@ -1472,6 +1476,8 @@ int sqlite3_amatch_init( int rc = SQLITE_OK; SQLITE_EXTENSION_INIT2(pApi); (void)pzErrMsg; /* Not used */ +#ifndef SQLITE_OMIT_VIRTUALTABLE rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0); +#endif /* SQLITE_OMIT_VIRTUALTABLE */ return rc; } diff --git a/ext/misc/closure.c b/ext/misc/closure.c index 7b3d06492e..1f2ba50ac4 100644 --- a/ext/misc/closure.c +++ b/ext/misc/closure.c @@ -148,6 +148,8 @@ SQLITE_EXTENSION_INIT1 #include #include +#ifndef SQLITE_OMIT_VIRTUALTABLE + /* ** Forward declaration of objects used by this implementation */ @@ -923,6 +925,8 @@ static sqlite3_module closureModule = { 0 /* xRollbackTo */ }; +#endif /* SQLITE_OMIT_VIRTUALTABLE */ + /* ** Register the closure virtual table */ @@ -937,6 +941,8 @@ int sqlite3_closure_init( int rc = SQLITE_OK; SQLITE_EXTENSION_INIT2(pApi); (void)pzErrMsg; +#ifndef SQLITE_OMIT_VIRTUALTABLE rc = sqlite3_create_module(db, "transitive_closure", &closureModule, 0); +#endif /* SQLITE_OMIT_VIRTUALTABLE */ return rc; } diff --git a/ext/misc/fuzzer.c b/ext/misc/fuzzer.c index c0c294b11c..642b8f9e92 100644 --- a/ext/misc/fuzzer.c +++ b/ext/misc/fuzzer.c @@ -1166,6 +1166,8 @@ int sqlite3_fuzzer_init( ){ int rc = SQLITE_OK; SQLITE_EXTENSION_INIT2(pApi); +#ifndef SQLITE_OMIT_VIRTUALTABLE rc = sqlite3_create_module(db, "fuzzer", &fuzzerModule, 0); +#endif return rc; } diff --git a/ext/misc/spellfix.c b/ext/misc/spellfix.c index c368b34e8f..eb5442ed2f 100644 --- a/ext/misc/spellfix.c +++ b/ext/misc/spellfix.c @@ -29,6 +29,8 @@ SQLITE_EXTENSION_INIT1 # include #endif +#ifndef SQLITE_OMIT_VIRTUALTABLE + /* ** Character classes for ASCII characters: ** @@ -2821,6 +2823,8 @@ static int spellfix1Register(sqlite3 *db){ return rc; } +#endif /* SQLITE_OMIT_VIRTUALTABLE */ + /* ** Extension load function. */ @@ -2833,5 +2837,8 @@ int sqlite3_spellfix_init( const sqlite3_api_routines *pApi ){ SQLITE_EXTENSION_INIT2(pApi); +#ifndef SQLITE_OMIT_VIRTUALTABLE return spellfix1Register(db); +#endif + return SQLITE_OK; } diff --git a/manifest b/manifest index af0d36f61c..e1ee57d0b9 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C The\ssqlite3ExprCollSeq()\sfunction\scan\sno\slonger\sbe\scalled\swhile\sparse\nthe\sschema,\sso\sremove\sthe\scode\spath\sinside\sof\ssqlite3ExprCollSeq()\sthat\ndealt\swith\sthat\scase. -D 2013-05-15T17:47:12.088 +C Fixes\sto\sallow\stestfixture\sto\sbe\scompiled\swith\sSQLITE_OMIT_VIRTUAL_TABLE\sdefined. +D 2013-05-15T18:34:17.617 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in ce81671efd6223d19d4c8c6b88ac2c4134427111 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -83,14 +83,14 @@ F ext/fts3/unicode/mkunicode.tcl 7a9bc018e2962abb79563c5a39fe581fcbf2f675 F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43 F ext/icu/icu.c eb9ae1d79046bd7871aa97ee6da51eb770134b5a F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37 -F ext/misc/amatch.c 3369b2b544066e620d986f0085d039c77d1ef17f -F ext/misc/closure.c fec0c8537c69843e0b7631d500a14c0527962cd6 -F ext/misc/fuzzer.c fb64a15af978ae73fa9075b9b1dfbe82b8defc6f +F ext/misc/amatch.c eae8454cd9dcb287b2a3ec2e65a865a4ac5f0d06 +F ext/misc/closure.c 7e9197d0c94068f5c2b5333e05315b54b667046e +F ext/misc/fuzzer.c 51bd96960b6b077d41d6f3cedefbcb57f29efaa2 F ext/misc/ieee754.c 2565ce373d842977efe0922dc50b8a41b3289556 F ext/misc/nextchar.c 1131e2b36116ffc6fe6b2e3464bfdace27978b1e F ext/misc/regexp.c c25c65fe775f5d9801fb8573e36ebe73f2c0c2e0 F ext/misc/rot13.c 1ac6f95f99b575907b9b09c81a349114cf9be45a -F ext/misc/spellfix.c f9d24a2b2617cee143b7841b453e4e1fd8f189cc +F ext/misc/spellfix.c 6d7ce6105a4b7729f6c44ccdf1ab7e80d9707c02 F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 F ext/rtree/rtree.c 757abea591d4ff67c0ff4e8f9776aeda86b18c14 @@ -338,7 +338,7 @@ F test/capi3d.test 17b57ca28be3e37e14c2ba8f787d292d84b724a1 F test/capi3e.test f7408dda65c92b9056199fdc180f893015f83dde F test/cast.test 4c275cbdc8202d6f9c54a3596701719868ac7dc3 F test/check.test 2eb93611139a7dfaed3be80067c7dc5ceb5fb287 -F test/closure01.test 6194a899cdbba561d0439c0d6cc7bcdf4fc413e7 +F test/closure01.test dbb28f1ea9eeaf0a53ec5bc0fed352e479def8c7 F test/coalesce.test cee0dccb9fbd2d494b77234bccf9dc6c6786eb91 F test/collate1.test fd02c4d8afc71879c4bb952586389961a21fb0ce F test/collate2.test 04cebe4a033be319d6ddbb3bbc69464e01700b49 @@ -975,7 +975,7 @@ F test/vtabF.test fd5ad376f5a34fe0891df1f3cddb4fe7c3eb077e F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5 F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8 F test/vtab_shared.test 82f463886e18d7f8395a4b6167c91815efe54839 -F test/wal.test e6dcf26e3e5cce2adb2f2f57eda53bc2c54c580c +F test/wal.test 3a6ebdf0287b38b5537c07c517b30dda9aaac317 F test/wal2.test d4b470f13c87f6d8268b004380afa04c3c67cb90 F test/wal3.test b22eb662bcbc148c5f6d956eaf94b047f7afe9c0 F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c @@ -1064,7 +1064,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 5cc1cc55d28a73d390d51fdf6f2c026f1cab1d75 -R e7ec9db939b43c1fb3d0a5a8ccbae374 -U drh -Z 1e4ce829f36f461fad5816fc545c080f +P 867b3e3b29a357f68e48f0898bf323c5dd0575a4 +R ef8f76bf9ec6d291e5abf1f22c383790 +U dan +Z 312bf0a08b7de8fff43ce46237080a73 diff --git a/manifest.uuid b/manifest.uuid index 58d9438daf..b1b65e2570 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -867b3e3b29a357f68e48f0898bf323c5dd0575a4 \ No newline at end of file +00231fb0127960d700de3549e34e82f8ec1b5819 \ No newline at end of file diff --git a/test/closure01.test b/test/closure01.test index abae85c3ac..5dac87a0ce 100644 --- a/test/closure01.test +++ b/test/closure01.test @@ -15,6 +15,8 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl set testprefix closure01 +ifcapable !vtab { finish_test ; return } + load_static_extension db closure do_execsql_test 1.0 { diff --git a/test/wal.test b/test/wal.test index 8ce63cf824..c8078a1b95 100644 --- a/test/wal.test +++ b/test/wal.test @@ -1512,11 +1512,10 @@ do_test wal-23.3 { faultsim_restore_and_reopen execsql { SELECT * FROM t1 } } {1 2 3 4} -set nPage [expr 2+$AUTOVACUUM] do_test wal-23.4 { set ::log } [list SQLITE_NOTICE_RECOVER_WAL \ - "recovered $nPage frames from WAL file $walfile"] + "recovered 2 frames from WAL file $walfile"] ifcapable autovacuum { From 06006633466be537deb9d6a4edc927e72a0e7bc4 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Wed, 15 May 2013 20:35:13 +0000 Subject: [PATCH 2/8] Apply compilation fix from [a58af81483] to the other makefiles as well. FossilOrigin-Name: 7e76889d675e4c646158f7f9188d25f155c18876 --- Makefile.in | 1 + Makefile.msc | 1 + manifest | 16 ++++++++-------- manifest.uuid | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile.in b/Makefile.in index 068da1a212..5cf57cf1c0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -411,6 +411,7 @@ TESTSRC2 = \ $(TOP)/src/func.c \ $(TOP)/src/insert.c \ $(TOP)/src/wal.c \ + $(TOP)/src/main.c \ $(TOP)/src/mem5.c \ $(TOP)/src/os.c \ $(TOP)/src/os_unix.c \ diff --git a/Makefile.msc b/Makefile.msc index 1c86264804..57d7065b07 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -732,6 +732,7 @@ TESTSRC2 = \ $(TOP)\src\func.c \ $(TOP)\src\insert.c \ $(TOP)\src\wal.c \ + $(TOP)\src\main.c \ $(TOP)\src\mem5.c \ $(TOP)\src\os.c \ $(TOP)\src\os_unix.c \ diff --git a/manifest b/manifest index e1ee57d0b9..d59b9278a2 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Fixes\sto\sallow\stestfixture\sto\sbe\scompiled\swith\sSQLITE_OMIT_VIRTUAL_TABLE\sdefined. -D 2013-05-15T18:34:17.617 +C Apply\scompilation\sfix\sfrom\s[a58af81483]\sto\sthe\sother\smakefiles\sas\swell. +D 2013-05-15T20:35:13.618 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f -F Makefile.in ce81671efd6223d19d4c8c6b88ac2c4134427111 +F Makefile.in 101fc5d712bfa348313987e5728ead013dc82fba F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc 8f4ee0dab220a5276d5da61149dfd6cd5d1dd5b8 +F Makefile.msc 5dc042f51187414d5886ac6d8308630d484690c4 F Makefile.vxworks db21ed42a01d5740e656b16f92cb5d8d5e5dd315 F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6 F VERSION 05c7bd63b96f31cfdef5c766ed91307ac121f5aa @@ -1064,7 +1064,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 867b3e3b29a357f68e48f0898bf323c5dd0575a4 -R ef8f76bf9ec6d291e5abf1f22c383790 -U dan -Z 312bf0a08b7de8fff43ce46237080a73 +P 00231fb0127960d700de3549e34e82f8ec1b5819 +R 04fee50c5604612c3f01940384e4b851 +U mistachkin +Z 5365a8b6e125dec6044a55dc87f2dc60 diff --git a/manifest.uuid b/manifest.uuid index b1b65e2570..c2e35de594 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -00231fb0127960d700de3549e34e82f8ec1b5819 \ No newline at end of file +7e76889d675e4c646158f7f9188d25f155c18876 \ No newline at end of file From 58a450c04105bd9d9126e9f80d706ee0a366821a Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 16 May 2013 01:02:45 +0000 Subject: [PATCH 3/8] Treat identifiers in the HAVING clause the same as in the WHERE clause. Only consider AS names from the result set to match if there are no other matches. Continuation of the fix for [2500cdb9be05]. This check-in fixes a bug found by [http://www.sqlite.org/sqllogictest/ | SqlLogicTest] during release testing for version 3.7.17. FossilOrigin-Name: 9ffff3d05226bbd01a0745dd0a511776358253c0 --- manifest | 14 +++++++------- manifest.uuid | 2 +- src/resolve.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index d59b9278a2..ec49a5a18d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Apply\scompilation\sfix\sfrom\s[a58af81483]\sto\sthe\sother\smakefiles\sas\swell. -D 2013-05-15T20:35:13.618 +C Treat\sidentifiers\sin\sthe\sHAVING\sclause\sthe\ssame\sas\sin\sthe\sWHERE\sclause.\nOnly\sconsider\sAS\snames\sfrom\sthe\sresult\sset\sto\smatch\sif\sthere\sare\sno\sother\nmatches.\s\sContinuation\sof\sthe\sfix\sfor\s[2500cdb9be05].\s\sThis\scheck-in\nfixes\sa\sbug\sfound\sby\s[http://www.sqlite.org/sqllogictest/\s|\sSqlLogicTest]\nduring\srelease\stesting\sfor\sversion\s3.7.17. +D 2013-05-16T01:02:45.632 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 101fc5d712bfa348313987e5728ead013dc82fba F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -189,7 +189,7 @@ F src/pragma.c 8779308bc1ea1901c4bc94dfe9a83d436f73f52c F src/prepare.c 743e484233c51109666d402f470523553b41797c F src/printf.c 4a9f882f1c1787a8b494a2987765acf9d97ac21f F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50 -F src/resolve.c 83cc2d942ee216bc56956c6e6fadb691c1727fa1 +F src/resolve.c 89f9003e8316ee3a172795459efc2a0274e1d5a8 F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0 F src/select.c a4641882279becc200f2680f55f3e89d4e7c7f78 F src/shell.c 2109d54f67c815a100abd7dc6a6e25eddb3b97eb @@ -1064,7 +1064,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 00231fb0127960d700de3549e34e82f8ec1b5819 -R 04fee50c5604612c3f01940384e4b851 -U mistachkin -Z 5365a8b6e125dec6044a55dc87f2dc60 +P 7e76889d675e4c646158f7f9188d25f155c18876 +R 734d69ab143a2741580e8434cd6321b1 +U drh +Z 6441f17ff50e2e08c247bf534d4dc934 diff --git a/manifest.uuid b/manifest.uuid index c2e35de594..b0132386fc 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7e76889d675e4c646158f7f9188d25f155c18876 \ No newline at end of file +9ffff3d05226bbd01a0745dd0a511776358253c0 \ No newline at end of file diff --git a/src/resolve.c b/src/resolve.c index a8e196926c..91efcaa1a1 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -1159,8 +1159,8 @@ static int resolveSelectStep(Walker *pWalker, Select *p){ ** re-evaluated for each reference to it. */ sNC.pEList = p->pEList; - if( sqlite3ResolveExprNames(&sNC, p->pHaving) ) return WRC_Abort; sNC.ncFlags |= NC_AsMaybe; + if( sqlite3ResolveExprNames(&sNC, p->pHaving) ) return WRC_Abort; if( sqlite3ResolveExprNames(&sNC, p->pWhere) ) return WRC_Abort; sNC.ncFlags &= ~NC_AsMaybe; From 617dc8602d049822bf3d488dc2f09cb762fa029b Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 16 May 2013 11:57:28 +0000 Subject: [PATCH 4/8] In sqlite3_close_v2(), do not attempt to roll back a transaction if there exist active statement objects. Any open transaction will be rolled back when the last of these statement objects is finalized. FossilOrigin-Name: d11e76072a17fe833b87595d9d79f2c4b0b09cb3 --- manifest | 17 ++++++----- manifest.uuid | 2 +- src/main.c | 20 +++++++++---- src/test1.c | 25 ++++++++++++++++ test/close.test | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 128 insertions(+), 15 deletions(-) create mode 100644 test/close.test diff --git a/manifest b/manifest index ec49a5a18d..f3e24afc9e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Treat\sidentifiers\sin\sthe\sHAVING\sclause\sthe\ssame\sas\sin\sthe\sWHERE\sclause.\nOnly\sconsider\sAS\snames\sfrom\sthe\sresult\sset\sto\smatch\sif\sthere\sare\sno\sother\nmatches.\s\sContinuation\sof\sthe\sfix\sfor\s[2500cdb9be05].\s\sThis\scheck-in\nfixes\sa\sbug\sfound\sby\s[http://www.sqlite.org/sqllogictest/\s|\sSqlLogicTest]\nduring\srelease\stesting\sfor\sversion\s3.7.17. -D 2013-05-16T01:02:45.632 +C In\ssqlite3_close_v2(),\sdo\snot\sattempt\sto\sroll\sback\sa\stransaction\sif\sthere\sexist\sactive\sstatement\sobjects.\sAny\sopen\stransaction\swill\sbe\srolled\sback\swhen\sthe\slast\sof\sthese\sstatement\sobjects\sis\sfinalized. +D 2013-05-16T11:57:28.062 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 101fc5d712bfa348313987e5728ead013dc82fba F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -160,7 +160,7 @@ F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d F src/legacy.c 0df0b1550b9cc1f58229644735e317ac89131f12 F src/lempar.c cdf0a000315332fc9b50b62f3b5e22e080a0952b F src/loadext.c c48f7f3f170e502fe0cc20748e03c6e0b5a016c2 -F src/main.c ccbac976228cd21209ede2bdc82bbf22b0ddf197 +F src/main.c c6419ef57392b1aa0cf6ed9c80dfc06b153fe299 F src/malloc.c fe085aa851b666b7c375c1ff957643dc20a04bf6 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c 437c7c4af964895d4650f29881df63535caaa1fa @@ -201,7 +201,7 @@ F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d F src/status.c bedc37ec1a6bb9399944024d63f4c769971955a9 F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e F src/tclsqlite.c 2ecec9937e69bc17560ad886da35195daa7261b8 -F src/test1.c ab9dd4fc486a2542f57a2ca17d74fc7f28dfd05a +F src/test1.c 045d45a4f7eeb5d963f8fc150339f1bad279011a F src/test2.c 7355101c085304b90024f2261e056cdff13c6c35 F src/test3.c 1c0e5d6f080b8e33c1ce8b3078e7013fdbcd560c F src/test4.c 9b32d22f5f150abe23c1830e2057c4037c45b3df @@ -338,6 +338,7 @@ F test/capi3d.test 17b57ca28be3e37e14c2ba8f787d292d84b724a1 F test/capi3e.test f7408dda65c92b9056199fdc180f893015f83dde F test/cast.test 4c275cbdc8202d6f9c54a3596701719868ac7dc3 F test/check.test 2eb93611139a7dfaed3be80067c7dc5ceb5fb287 +F test/close.test e37610d60e9c9b9979a981f3f50071d7dff28616 F test/closure01.test dbb28f1ea9eeaf0a53ec5bc0fed352e479def8c7 F test/coalesce.test cee0dccb9fbd2d494b77234bccf9dc6c6786eb91 F test/collate1.test fd02c4d8afc71879c4bb952586389961a21fb0ce @@ -1064,7 +1065,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 7e76889d675e4c646158f7f9188d25f155c18876 -R 734d69ab143a2741580e8434cd6321b1 -U drh -Z 6441f17ff50e2e08c247bf534d4dc934 +P 9ffff3d05226bbd01a0745dd0a511776358253c0 +R 1a17d95315a3a4d605dc90092cbaec4e +U dan +Z 6e4c531756ef5b922f59a9b9e491858b diff --git a/manifest.uuid b/manifest.uuid index b0132386fc..99b6ba1500 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9ffff3d05226bbd01a0745dd0a511776358253c0 \ No newline at end of file +d11e76072a17fe833b87595d9d79f2c4b0b09cb3 \ No newline at end of file diff --git a/src/main.c b/src/main.c index 763adbfe8e..39f60421e6 100644 --- a/src/main.c +++ b/src/main.c @@ -848,12 +848,6 @@ static int sqlite3Close(sqlite3 *db, int forceZombie){ return SQLITE_BUSY; } - /* If a transaction is open, roll it back. This also ensures that if - ** any database schemas have been modified by the current transaction - ** they are reset. And that the required b-tree mutex is held to make - ** the the pager rollback and schema reset an atomic operation. */ - sqlite3RollbackAll(db, SQLITE_OK); - #ifdef SQLITE_ENABLE_SQLLOG if( sqlite3GlobalConfig.xSqllog ){ /* Closing the handle. Fourth parameter is passed the value 2. */ @@ -908,6 +902,12 @@ void sqlite3LeaveMutexAndCloseZombie(sqlite3 *db){ ** go ahead and free all resources. */ + /* If a transaction is open, roll it back. This also ensures that if + ** any database schemas have been modified by an uncommitted transaction + ** they are reset. And that the required b-tree mutex is held to make + ** the pager rollback and schema reset an atomic operation. */ + sqlite3RollbackAll(db, SQLITE_OK); + /* Free any outstanding Savepoint structures. */ sqlite3CloseSavepoints(db); @@ -1008,7 +1008,15 @@ void sqlite3RollbackAll(sqlite3 *db, int tripCode){ int inTrans = 0; assert( sqlite3_mutex_held(db->mutex) ); sqlite3BeginBenignMalloc(); + + /* Obtain all b-tree mutexes before making any calls to BtreeRollback(). + ** This is important in case the transaction being rolled back has + ** modified the database schema. If the b-tree mutexes are not taken + ** here, then another shared-cache connection might sneak in between + ** the database rollback and schema reset, which can cause false + ** corruption reports in some cases. */ sqlite3BtreeEnterAll(db); + for(i=0; inDb; i++){ Btree *p = db->aDb[i].pBt; if( p ){ diff --git a/src/test1.c b/src/test1.c index 59de1db8e5..a638e480ad 100644 --- a/src/test1.c +++ b/src/test1.c @@ -681,6 +681,30 @@ static int sqlite_test_close( return TCL_OK; } +/* +** Usage: sqlite3_close_v2 DB +** +** Closes the database opened by sqlite3_open. +*/ +static int sqlite_test_close_v2( + void *NotUsed, + Tcl_Interp *interp, /* The TCL interpreter that invoked this command */ + int argc, /* Number of arguments */ + char **argv /* Text of each argument */ +){ + sqlite3 *db; + int rc; + if( argc!=2 ){ + Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0], + " FILENAME\"", 0); + return TCL_ERROR; + } + if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR; + rc = sqlite3_close_v2(db); + Tcl_SetResult(interp, (char *)t1ErrorName(rc), TCL_STATIC); + return TCL_OK; +} + /* ** Implementation of the x_coalesce() function. ** Return the first argument non-NULL argument. @@ -6077,6 +6101,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){ { "sqlite3_get_table_printf", (Tcl_CmdProc*)test_get_table_printf }, #endif { "sqlite3_close", (Tcl_CmdProc*)sqlite_test_close }, + { "sqlite3_close_v2", (Tcl_CmdProc*)sqlite_test_close_v2 }, { "sqlite3_create_function", (Tcl_CmdProc*)test_create_function }, { "sqlite3_create_aggregate", (Tcl_CmdProc*)test_create_aggregate }, { "sqlite_register_test_function", (Tcl_CmdProc*)test_register_func }, diff --git a/test/close.test b/test/close.test new file mode 100644 index 0000000000..355a8865b5 --- /dev/null +++ b/test/close.test @@ -0,0 +1,79 @@ +# 2013 May 14 +# +# The author disclaims copyright to this source code. In place of +# a legal notice, here is a blessing: +# +# May you do good and not evil. +# May you find forgiveness for yourself and forgive others. +# May you share freely, never taking more than you give. +# +#*********************************************************************** +# +# Test some specific circumstances to do with shared cache mode. +# + + +set testdir [file dirname $argv0] +source $testdir/tester.tcl +set ::testprefix close + +do_execsql_test 1.0 { + CREATE TABLE t1(x); + INSERT INTO t1 VALUES('one'); + INSERT INTO t1 VALUES('two'); + INSERT INTO t1 VALUES('three'); +} +db close + +do_test 1.1 { + set DB [sqlite3_open test.db] + sqlite3_close_v2 $DB +} {SQLITE_OK} + +do_test 1.2.1 { + set DB [sqlite3_open test.db] + set STMT [sqlite3_prepare $DB "SELECT * FROM t1" -1 dummy] + sqlite3_close_v2 $DB +} {SQLITE_OK} +do_test 1.2.2 { + sqlite3_finalize $STMT +} {SQLITE_OK} + +do_test 1.3.1 { + set DB [sqlite3_open test.db] + set STMT [sqlite3_prepare $DB "SELECT * FROM t1" -1 dummy] + sqlite3_step $STMT + sqlite3_close_v2 $DB +} {SQLITE_OK} + +do_test 1.3.2 { + sqlite3_column_text $STMT 0 +} {one} + +do_test 1.3.3 { + sqlite3_finalize $STMT +} {SQLITE_OK} + +do_test 1.4.1 { + set DB [sqlite3_open test.db] + set STMT [sqlite3_prepare $DB "SELECT * FROM t1" -1 dummy] + sqlite3_step $STMT + sqlite3_close_v2 $DB +} {SQLITE_OK} + +do_test 1.4.2 { + list [sqlite3_step $STMT] [sqlite3_column_text $STMT 0] +} {SQLITE_ROW two} + +do_test 1.4.3 { + list [catch { + sqlite3_prepare $DB "SELECT * FROM sqlite_master" -1 dummy + } msg] $msg +} {1 {(21) library routine called out of sequence}} + +do_test 1.4.4 { + sqlite3_finalize $STMT +} {SQLITE_OK} + +finish_test + From 6e8752d487edb879855877afd86ae64d2dd149be Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 16 May 2013 12:41:49 +0000 Subject: [PATCH 5/8] Fix compilation with SQLITE_OMIT_WAL on Win32. FossilOrigin-Name: 6d45a79fb18dcd305cc41c525060e42f2402bd77 --- manifest | 14 +++++++------- manifest.uuid | 2 +- src/os_win.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/manifest b/manifest index f3e24afc9e..8b5c104d53 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\ssqlite3_close_v2(),\sdo\snot\sattempt\sto\sroll\sback\sa\stransaction\sif\sthere\sexist\sactive\sstatement\sobjects.\sAny\sopen\stransaction\swill\sbe\srolled\sback\swhen\sthe\slast\sof\sthese\sstatement\sobjects\sis\sfinalized. -D 2013-05-16T11:57:28.062 +C Fix\scompilation\swith\sSQLITE_OMIT_WAL\son\sWin32. +D 2013-05-16T12:41:49.183 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 101fc5d712bfa348313987e5728ead013dc82fba F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -178,7 +178,7 @@ F src/os.c b4ad71336fd96f97776f75587cd9e8218288f5be F src/os.h 4a46270a64e9193af4a0aaa3bc2c66dc07c29b3f F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04 F src/os_unix.c 5e0b0ca7594f6707a3ed155528a3ba3318c95e15 -F src/os_win.c 4e2bf0760409aef35e298ff725054e94d834e1a3 +F src/os_win.c 2076d4d1f0f2f06c622b6617b4959910a5dc5b4e F src/pager.c 49e23f9898113ddfe90942bdf1c1ef57955d0921 F src/pager.h 5cb78b8e1adfd5451e600be7719f5a99d87ac3b1 F src/parse.y 9708365594eea519cdc8504dee425c0a41c79502 @@ -1065,7 +1065,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 9ffff3d05226bbd01a0745dd0a511776358253c0 -R 1a17d95315a3a4d605dc90092cbaec4e -U dan -Z 6e4c531756ef5b922f59a9b9e491858b +P d11e76072a17fe833b87595d9d79f2c4b0b09cb3 +R 3da03a8d3e4a56c326130da7065a196f +U mistachkin +Z 80f7b643846aae133072aa5f02717db7 diff --git a/manifest.uuid b/manifest.uuid index 99b6ba1500..8c24432491 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d11e76072a17fe833b87595d9d79f2c4b0b09cb3 \ No newline at end of file +6d45a79fb18dcd305cc41c525060e42f2402bd77 \ No newline at end of file diff --git a/src/os_win.c b/src/os_win.c index 66f0703878..fe47207d5c 100644 --- a/src/os_win.c +++ b/src/os_win.c @@ -2937,8 +2937,6 @@ static int winDeviceCharacteristics(sqlite3_file *id){ ((p->ctrlFlags & WINFILE_PSOW)?SQLITE_IOCAP_POWERSAFE_OVERWRITE:0); } -#ifndef SQLITE_OMIT_WAL - /* ** Windows will only let you create file view mappings ** on allocation size granularity boundaries. @@ -2947,6 +2945,8 @@ static int winDeviceCharacteristics(sqlite3_file *id){ */ SYSTEM_INFO winSysInfo; +#ifndef SQLITE_OMIT_WAL + /* ** Helper functions to obtain and relinquish the global mutex. The ** global mutex is used to protect the winLockInfo objects used by From 5b04dc517a68ba6ff73cfb0ecd22e54d3237ace5 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 16 May 2013 14:28:47 +0000 Subject: [PATCH 6/8] Several releasetest.tcl related fixes to test cases. No code changes. FossilOrigin-Name: e97d744ba1138e6c4c1fc657c32f4391ea7479f1 --- manifest | 18 +++++++++--------- manifest.uuid | 2 +- test/btreefault.test | 8 ++++++++ test/io.test | 2 ++ test/mmap1.test | 37 +++++++++++++++++++++---------------- 5 files changed, 41 insertions(+), 26 deletions(-) diff --git a/manifest b/manifest index 8b5c104d53..0b46109e24 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\scompilation\swith\sSQLITE_OMIT_WAL\son\sWin32. -D 2013-05-16T12:41:49.183 +C Several\sreleasetest.tcl\srelated\sfixes\sto\stest\scases.\sNo\scode\schanges. +D 2013-05-16T14:28:47.757 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 101fc5d712bfa348313987e5728ead013dc82fba F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -327,7 +327,7 @@ F test/boundary3.tcl 8901d6a503d0bf64251dd81cc74e5ad3add4b119 F test/boundary3.test 56ef82096b4329aca2be74fa1e2b0f762ea0eb45 F test/boundary4.tcl 0bb4b1a94f4fc5ae59b79b9a2b7a140c405e2983 F test/boundary4.test 89e02fa66397b8a325d5eb102b5806f961f8ec4b -F test/btreefault.test 06899a377f31a8c1a3048ec69831522d4e5c6045 +F test/btreefault.test f52c593513bda80a506c848325c73c840590884d F test/busy.test 76b4887f8b9160ba903c1ac22e8ff406ad6ae2f0 F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de F test/capi2.test e8b18cc61090b6e5e388f54d6b125d711d1b265a @@ -572,7 +572,7 @@ F test/instr.test a34e1d46a9eefb098a7167ef0e730a4a3d82fba0 F test/intarray.test 066b7d7ac38d25bf96f87f1b017bfc687551cdd4 F test/interrupt.test dfe9a67a94b0b2d8f70545ba1a6cca10780d71cc F test/intpkey.test 7af30f6ae852d8d1c2b70e4bf1551946742e92d8 -F test/io.test 0147ed5fdbce3286d6128f5f7e3b76ee8352d652 +F test/io.test 2b5b585964bd59008cc74b03011bebac67191f6b F test/ioerr.test 40bb2cfcab63fb6aa7424cd97812a84bc16b5fb8 F test/ioerr2.test 9d71166f8466eda510f1af6137bdabaa82b5408d F test/ioerr3.test d3cec5e1a11ad6d27527d0d38573fbff14c71bdd @@ -649,7 +649,7 @@ F test/misc5.test 528468b26d03303b1f047146e5eefc941b9069f5 F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91 F test/misc7.test dd82ec9250b89178b96cd28b2aca70639d21e5b3 F test/misuse.test ba4fb5d1a6101d1c171ea38b3c613d0661c83054 -F test/mmap1.test 8696aa1b0bd88961c2f16af2a3f7a69d701cea50 +F test/mmap1.test 25db81f0143dc94ac2e39dec1d1cfacc61cbb58d F test/mmap2.test a5ba639f90b5fc487400a49e158e14e465943e98 F test/multiplex.test e08cc7177bd6d85990ee1d71100bb6c684c02256 F test/multiplex2.test 580ca5817c7edbe4cc68fa150609c9473393003a @@ -1065,7 +1065,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P d11e76072a17fe833b87595d9d79f2c4b0b09cb3 -R 3da03a8d3e4a56c326130da7065a196f -U mistachkin -Z 80f7b643846aae133072aa5f02717db7 +P 6d45a79fb18dcd305cc41c525060e42f2402bd77 +R 82c7f4cd71022608e12e343ceb6622ec +U dan +Z ed7c1f28e4d03463452da6c1e6bfe3f8 diff --git a/manifest.uuid b/manifest.uuid index 8c24432491..41a1643c8d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6d45a79fb18dcd305cc41c525060e42f2402bd77 \ No newline at end of file +e97d744ba1138e6c4c1fc657c32f4391ea7479f1 \ No newline at end of file diff --git a/test/btreefault.test b/test/btreefault.test index 45d326da7f..9b42240b38 100644 --- a/test/btreefault.test +++ b/test/btreefault.test @@ -18,6 +18,14 @@ source $testdir/tester.tcl source $testdir/malloc_common.tcl set testprefix btreefault +# This test will not work with an in-memory journal, as the database will +# become corrupt if an error is injected into a transaction after it starts +# writing data out to the db file. +if {[permutation]=="inmemory_journal"} { + finish_test + return +} + do_test 1-pre1 { execsql { PRAGMA auto_vacuum = incremental; diff --git a/test/io.test b/test/io.test index 43289567f1..cd66542aa8 100644 --- a/test/io.test +++ b/test/io.test @@ -580,6 +580,7 @@ do_test io-6.1 { execsql { PRAGMA mmap_size = 0; PRAGMA page_size = 1024; + PRAGMA cache_size = 2000; CREATE TABLE t1(x); CREATE TABLE t2(x); CREATE TABLE t3(x); @@ -615,6 +616,7 @@ foreach {tn sql} { db_restore sqlite3 db test.db -vfs devsym execsql { + PRAGMA cache_size = 2000; PRAGMA mmap_size = 0; SELECT x FROM t3 ORDER BY rowid; SELECT x FROM t3 ORDER BY x; diff --git a/test/mmap1.test b/test/mmap1.test index 09b6d95927..79e4bef39d 100644 --- a/test/mmap1.test +++ b/test/mmap1.test @@ -55,6 +55,9 @@ foreach {t mmap_size nRead c2init} { } { do_multiclient_test tn { + sql1 {PRAGMA cache_size=2000} + sql2 {PRAGMA cache_size=2000} + sql1 {PRAGMA page_size=1024} sql1 $mmap_size sql2 $c2init @@ -129,24 +132,26 @@ do_execsql_test 2.2 { SELECT count(*) FROM t1; } {1 32} -do_test 2.3 { - sqlite3 db2 test.db - db2 func rblob rblob - db2 eval { - DELETE FROM t1 WHERE (rowid%4); +if {[permutation] != "inmemory_journal"} { + do_test 2.3 { + sqlite3 db2 test.db + db2 func rblob rblob + db2 eval { + DELETE FROM t1 WHERE (rowid%4); + PRAGMA wal_checkpoint; + } + db2 eval { + INSERT INTO t1 SELECT rblob(500), rblob(500) FROM t1; -- 16 + SELECT count(*) FROM t1; + } + } {16} + + do_execsql_test 2.4 { PRAGMA wal_checkpoint; - } - db2 eval { - INSERT INTO t1 SELECT rblob(500), rblob(500) FROM t1; -- 16 - SELECT count(*) FROM t1; - } -} {16} + } {0 24 24} + db2 close +} -do_execsql_test 2.4 { - PRAGMA wal_checkpoint; -} {0 24 24} - -db2 close reset_db db func rblob rblob do_execsql_test 3.1 { From cf5db44ab64b7cb49a2065df9998c460b955692b Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 16 May 2013 18:33:06 +0000 Subject: [PATCH 7/8] Fix a typo in Makefile.in preventing compilation with the --disable-amalgamation option. FossilOrigin-Name: 8ffbefe7d72d25984440c0e7c92a5e9c472ed55e --- Makefile.in | 4 ++-- manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile.in b/Makefile.in index 5cf57cf1c0..052fd8fa6d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -870,8 +870,8 @@ fts3_tokenizer.lo: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR) fts3_tokenizer1.lo: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR) $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c -fts3_tokenizer_vtab.lo: $(TOP)/ext/fts3/fts3_tokenizer_vtab.c $(HDR) $(EXTHDR) - $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer_vtab.c +fts3_tokenize_vtab.lo: $(TOP)/ext/fts3/fts3_tokenize_vtab.c $(HDR) $(EXTHDR) + $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenize_vtab.c fts3_unicode.lo: $(TOP)/ext/fts3/fts3_unicode.c $(HDR) $(EXTHDR) $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_unicode.c diff --git a/manifest b/manifest index 0b46109e24..a487866fcb 100644 --- a/manifest +++ b/manifest @@ -1,7 +1,7 @@ -C Several\sreleasetest.tcl\srelated\sfixes\sto\stest\scases.\sNo\scode\schanges. -D 2013-05-16T14:28:47.757 +C Fix\sa\stypo\sin\sMakefile.in\spreventing\scompilation\swith\sthe\s--disable-amalgamation\soption. +D 2013-05-16T18:33:06.283 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f -F Makefile.in 101fc5d712bfa348313987e5728ead013dc82fba +F Makefile.in f6b58b7bdf6535f0f0620c486dd59aa4662c0b4f F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.msc 5dc042f51187414d5886ac6d8308630d484690c4 F Makefile.vxworks db21ed42a01d5740e656b16f92cb5d8d5e5dd315 @@ -1065,7 +1065,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 6d45a79fb18dcd305cc41c525060e42f2402bd77 -R 82c7f4cd71022608e12e343ceb6622ec +P e97d744ba1138e6c4c1fc657c32f4391ea7479f1 +R 50deb538a17752afed2038603eb4d28f U dan -Z ed7c1f28e4d03463452da6c1e6bfe3f8 +Z 127b9278bfe282e5fc9b0b2506ef38b4 diff --git a/manifest.uuid b/manifest.uuid index 41a1643c8d..3791d51973 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e97d744ba1138e6c4c1fc657c32f4391ea7479f1 \ No newline at end of file +8ffbefe7d72d25984440c0e7c92a5e9c472ed55e \ No newline at end of file From 4c5aeecc907f4cb36247322fd181eec9d578e9db Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 16 May 2013 19:15:07 +0000 Subject: [PATCH 8/8] Fix minor test script issues causing releasetest.tcl to fail. FossilOrigin-Name: d8ded9d8a1052885ce223c70efa55c0dd8b9920e --- manifest | 16 ++++++++-------- manifest.uuid | 2 +- test/io.test | 5 +++++ test/permutations.test | 6 +++++- test/where8.test | 4 ++++ 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/manifest b/manifest index a487866fcb..1b56586312 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\stypo\sin\sMakefile.in\spreventing\scompilation\swith\sthe\s--disable-amalgamation\soption. -D 2013-05-16T18:33:06.283 +C Fix\sminor\stest\sscript\sissues\scausing\sreleasetest.tcl\sto\sfail. +D 2013-05-16T19:15:07.754 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in f6b58b7bdf6535f0f0620c486dd59aa4662c0b4f F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -572,7 +572,7 @@ F test/instr.test a34e1d46a9eefb098a7167ef0e730a4a3d82fba0 F test/intarray.test 066b7d7ac38d25bf96f87f1b017bfc687551cdd4 F test/interrupt.test dfe9a67a94b0b2d8f70545ba1a6cca10780d71cc F test/intpkey.test 7af30f6ae852d8d1c2b70e4bf1551946742e92d8 -F test/io.test 2b5b585964bd59008cc74b03011bebac67191f6b +F test/io.test ecf44cc81664ad54d8253e2d88fc705b6554abe3 F test/ioerr.test 40bb2cfcab63fb6aa7424cd97812a84bc16b5fb8 F test/ioerr2.test 9d71166f8466eda510f1af6137bdabaa82b5408d F test/ioerr3.test d3cec5e1a11ad6d27527d0d38573fbff14c71bdd @@ -679,7 +679,7 @@ F test/pageropt.test 6b8f6a123a5572c195ad4ae40f2987007923bbd6 F test/pagesize.test 1dd51367e752e742f58e861e65ed7390603827a0 F test/pcache.test 065aa286e722ab24f2e51792c1f093bf60656b16 F test/pcache2.test a83efe2dec0d392f814bfc998def1d1833942025 -F test/permutations.test 3d0bab9c49c1ec08b868059e30a3e1956f2162e2 +F test/permutations.test d997a947ab8aabb15f763d50a030b3c11e8ef1b6 F test/pragma.test 5e7de6c32a5d764f09437d2025f07e4917b9e178 F test/pragma2.test 3a55f82b954242c642f8342b17dffc8b47472947 F test/printf.test ec9870c4dce8686a37818e0bf1aba6e6a1863552 @@ -1008,7 +1008,7 @@ F test/where4.test e9b9e2f2f98f00379e6031db6a6fca29bae782a2 F test/where5.test fdf66f96d29a064b63eb543e28da4dfdccd81ad2 F test/where6.test 5da5a98cec820d488e82708301b96cb8c18a258b F test/where7.test 5c566388f0cc318b0032ce860f4ac5548e3c265a -F test/where8.test d9f889e62dccddb9d790b0c84dfc7861e03a162c +F test/where8.test d6a283eb7348a8967d44e2a753f117ab0d21d4f3 F test/where8m.test da346596e19d54f0aba35ebade032a7c47d79739 F test/where9.test 1b4387c6eacc9a32b28b4d837c27f857c785d0d8 F test/whereA.test 24c234263c8fe358f079d5e57d884fb569d2da0a @@ -1065,7 +1065,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P e97d744ba1138e6c4c1fc657c32f4391ea7479f1 -R 50deb538a17752afed2038603eb4d28f +P 8ffbefe7d72d25984440c0e7c92a5e9c472ed55e +R f07a18b2e3f935e06c563a062973d3d2 U dan -Z 127b9278bfe282e5fc9b0b2506ef38b4 +Z d6b0c0831a8f288a82efe390e3410800 diff --git a/manifest.uuid b/manifest.uuid index 3791d51973..fa5f59ce99 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8ffbefe7d72d25984440c0e7c92a5e9c472ed55e \ No newline at end of file +d8ded9d8a1052885ce223c70efa55c0dd8b9920e \ No newline at end of file diff --git a/test/io.test b/test/io.test index cd66542aa8..11f9cc8422 100644 --- a/test/io.test +++ b/test/io.test @@ -613,6 +613,11 @@ foreach {tn sql} { COMMIT; } } { + + # These tests don't work with memsubsys1, as it causes the effective page + # cache size to become too small to hold the entire db in memory. + if {[permutation] == "memsubsys1"} continue + db_restore sqlite3 db test.db -vfs devsym execsql { diff --git a/test/permutations.test b/test/permutations.test index 3a3be27aff..bc3ceb8085 100644 --- a/test/permutations.test +++ b/test/permutations.test @@ -243,10 +243,14 @@ lappend ::testsuitelist xxx # Run some tests using pre-allocated page and scratch blocks. # +# mmap1.test is excluded because a good number of its tests depend on +# the page-cache being larger than the database. But this permutation +# causes the effective limit on the page-cache to be just 24 pages. +# test_suite "memsubsys1" -description { Tests using pre-allocated page and scratch blocks } -files [ - test_set $::allquicktests -exclude ioerr5.test malloc5.test + test_set $::allquicktests -exclude ioerr5.test malloc5.test mmap1.test ] -initialize { catch {db close} sqlite3_shutdown diff --git a/test/where8.test b/test/where8.test index ae2d04a75d..9b6014e708 100644 --- a/test/where8.test +++ b/test/where8.test @@ -301,22 +301,26 @@ do_test where8-3.21.1 { SELECT a, d FROM t1, ((t2)) AS t3 WHERE (a=d OR b=e) AND a<5 ORDER BY a } } {1 1 2 2 3 3 4 2 4 4 0 0} +if {[permutation] != "no_optimization"} { do_test where8-3.21.2 { execsql_status { SELECT a, d FROM t1, ((SELECT * FROM t2)) AS t3 WHERE (a=d OR b=e) AND a<5 ORDER BY a } } {1 1 2 2 3 3 4 2 4 4 0 0} +} do_test where8-3.22 { execsql_status { SELECT a, d FROM ((((((t1))), (((t2)))))) WHERE (a=d OR b=e) AND a<5 ORDER BY a } } {1 1 2 2 3 3 4 2 4 4 0 0} +if {[permutation] != "no_optimization"} { do_test where8-3.23 { execsql_status { SELECT * FROM ((SELECT * FROM t2)) AS t3; } } {1 {} I 2 four IV 3 {} IX 4 sixteen XVI 5 {} XXV 6 thirtysix XXXVI 7 fortynine XLIX 8 sixtyeight LXIV 9 eightyone LXXXIX 10 {} C 9 0} +} #----------------------------------------------------------------------- # The following tests - where8-4.* - verify that adding or removing