diff --git a/ext/recover/dbdata.c b/ext/recover/dbdata.c index dca468f7b8..4132b83d71 100644 --- a/ext/recover/dbdata.c +++ b/ext/recover/dbdata.c @@ -71,6 +71,7 @@ ** It contains one entry for each b-tree pointer between a parent and ** child page in the database. */ + #if !defined(SQLITEINT_H) #include "sqlite3ext.h" @@ -82,6 +83,8 @@ SQLITE_EXTENSION_INIT1 #include #include +#ifndef SQLITE_OMIT_VIRTUALTABLE + #define DBDATA_PADDING_BYTES 100 typedef struct DbdataTable DbdataTable; @@ -935,3 +938,5 @@ int sqlite3_dbdata_init( SQLITE_EXTENSION_INIT2(pApi); return sqlite3DbdataRegister(db); } + +#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ diff --git a/ext/recover/recover1.test b/ext/recover/recover1.test index 94bcd348a7..dfe176fe85 100644 --- a/ext/recover/recover1.test +++ b/ext/recover/recover1.test @@ -10,16 +10,9 @@ #*********************************************************************** # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl - set testprefix recover1 - - proc compare_result {db1 db2 sql} { set r1 [$db1 eval $sql] set r2 [$db2 eval $sql] diff --git a/ext/recover/recover_common.tcl b/ext/recover/recover_common.tcl index 3f2ff2d6cc..fdf735ee75 100644 --- a/ext/recover/recover_common.tcl +++ b/ext/recover/recover_common.tcl @@ -1,5 +1,14 @@ - - + + +if {![info exists testdir]} { + set testdir [file join [file dirname [info script]] .. .. test] +} +source $testdir/tester.tcl + +if {[info commands sqlite3_recover_init]==""} { + finish_test + return -code return +} diff --git a/ext/recover/recoverclobber.test b/ext/recover/recoverclobber.test index 537af8e7c1..e096b2e216 100644 --- a/ext/recover/recoverclobber.test +++ b/ext/recover/recoverclobber.test @@ -12,17 +12,9 @@ # Tests for the SQLITE_RECOVER_ROWIDS option. # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl set testprefix recoverclobber -ifcapable !vtab { - finish_test; return -} - proc recover {db output} { set R [sqlite3_recover_init db main test.db2] $R run diff --git a/ext/recover/recovercorrupt.test b/ext/recover/recovercorrupt.test index 40859f3d1c..eb6fe53add 100644 --- a/ext/recover/recovercorrupt.test +++ b/ext/recover/recovercorrupt.test @@ -10,12 +10,7 @@ #*********************************************************************** # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl - set testprefix recovercorrupt database_may_be_corrupt diff --git a/ext/recover/recovercorrupt2.test b/ext/recover/recovercorrupt2.test index 20d4c39bcd..7147c67e93 100644 --- a/ext/recover/recovercorrupt2.test +++ b/ext/recover/recovercorrupt2.test @@ -10,12 +10,7 @@ #*********************************************************************** # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl - set testprefix recovercorrupt2 do_execsql_test 1.0 { diff --git a/ext/recover/recoverfault.test b/ext/recover/recoverfault.test index 2ea87860b3..30bb65527d 100644 --- a/ext/recover/recoverfault.test +++ b/ext/recover/recoverfault.test @@ -10,12 +10,7 @@ #*********************************************************************** # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl - set testprefix recoverfault diff --git a/ext/recover/recoverfault2.test b/ext/recover/recoverfault2.test index 4f7131ecfb..e80d480ce1 100644 --- a/ext/recover/recoverfault2.test +++ b/ext/recover/recoverfault2.test @@ -10,12 +10,7 @@ #*********************************************************************** # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl - set testprefix recoverfault2 diff --git a/ext/recover/recoverold.test b/ext/recover/recoverold.test index 691737bdc5..e942192827 100644 --- a/ext/recover/recoverold.test +++ b/ext/recover/recoverold.test @@ -11,17 +11,9 @@ # # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl set testprefix recoverold -ifcapable !vtab { - finish_test; return -} - proc compare_result {db1 db2 sql} { set r1 [$db1 eval $sql] set r2 [$db2 eval $sql] diff --git a/ext/recover/recoverpgsz.test b/ext/recover/recoverpgsz.test index 71413b0ead..8d064a4e9c 100644 --- a/ext/recover/recoverpgsz.test +++ b/ext/recover/recoverpgsz.test @@ -10,11 +10,7 @@ #*********************************************************************** # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl db close sqlite3_test_control_pending_byte 0x1000000 diff --git a/ext/recover/recoverrowid.test b/ext/recover/recoverrowid.test index bd47422eaf..5855e84fa6 100644 --- a/ext/recover/recoverrowid.test +++ b/ext/recover/recoverrowid.test @@ -12,17 +12,9 @@ # Tests for the SQLITE_RECOVER_ROWIDS option. # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl set testprefix recoverrowid -ifcapable !vtab { - finish_test; return -} - proc recover {db bRowids output} { forcedelete $output diff --git a/ext/recover/recoverslowidx.test b/ext/recover/recoverslowidx.test index 4dfb7e5f53..ecd7743a4e 100644 --- a/ext/recover/recoverslowidx.test +++ b/ext/recover/recoverslowidx.test @@ -12,17 +12,9 @@ # Tests for the SQLITE_RECOVER_SLOWINDEXES option. # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl set testprefix recoverslowidx -ifcapable !vtab { - finish_test; return -} - do_execsql_test 1.0 { CREATE TABLE t1(a, b); CREATE INDEX i1 ON t1(a); diff --git a/ext/recover/recoversql.test b/ext/recover/recoversql.test index 19f7ec7a1c..0a6726727d 100644 --- a/ext/recover/recoversql.test +++ b/ext/recover/recoversql.test @@ -11,17 +11,9 @@ # # -if {![info exists testdir]} { - set testdir [file join [file dirname [info script]] .. .. test] -} source [file join [file dirname [info script]] recover_common.tcl] -source $testdir/tester.tcl set testprefix recoversql -ifcapable !vtab { - finish_test; return -} - do_execsql_test 1.0 { CREATE TABLE "x.1" (x, y); INSERT INTO "x.1" VALUES(1, 1), (2, 2), (3, 3); diff --git a/ext/recover/sqlite3recover.c b/ext/recover/sqlite3recover.c index 2952274ebb..1dd63fb3f4 100644 --- a/ext/recover/sqlite3recover.c +++ b/ext/recover/sqlite3recover.c @@ -17,6 +17,8 @@ #include #include +#ifndef SQLITE_OMIT_VIRTUALTABLE + /* ** Declaration for public API function in file dbdata.c. This may be called ** with NULL as the final two arguments to register the sqlite_dbptr and @@ -2844,3 +2846,6 @@ int sqlite3_recover_finish(sqlite3_recover *p){ } return rc; } + +#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ + diff --git a/ext/recover/test_recover.c b/ext/recover/test_recover.c index 99c7aeca34..1c333df8e0 100644 --- a/ext/recover/test_recover.c +++ b/ext/recover/test_recover.c @@ -18,6 +18,8 @@ #include #include +#ifndef SQLITE_OMIT_VIRTUALTABLE + typedef struct TestRecover TestRecover; struct TestRecover { sqlite3_recover *p; @@ -284,9 +286,10 @@ static int test_sqlite3_dbdata_init( return TCL_OK; } - +#endif /* SQLITE_OMIT_VIRTUALTABLE */ int TestRecover_Init(Tcl_Interp *interp){ +#ifndef SQLITE_OMIT_VIRTUALTABLE struct Cmd { const char *zCmd; Tcl_ObjCmdProc *xProc; @@ -302,7 +305,7 @@ int TestRecover_Init(Tcl_Interp *interp){ struct Cmd *p = &aCmd[i]; Tcl_CreateObjCommand(interp, p->zCmd, p->xProc, p->pArg, 0); } - +#endif return TCL_OK; } diff --git a/manifest b/manifest index 91b3460bfd..4e680ffbc0 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\san\sunimportant\stestcase()\smacro\sthat\sis\sno\slonger\sreachable\sdue\sto\sthe\nimprovement\sin\scorruption\sdetection. -D 2022-11-04T12:59:04.079 +C Fix\sTcl\stests\sso\sthat\sthey\sagain\sbuild\sand\srun\swith\sSQLITE_OMIT_VIRTUALTABLE\sdefined. +D 2022-11-04T15:17:14.910 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -385,22 +385,22 @@ F ext/rbu/rbuvacuum4.test a78898e438a44803eb2bc897ba3323373c9f277418e2d6d76e90f2 F ext/rbu/sqlite3rbu.c 8737cabdfbee84bb25a7851ecef8b1312be332761238da9be6ddb10c62ad4291 F ext/rbu/sqlite3rbu.h 1dc88ab7bd32d0f15890ea08d23476c4198d3da3056985403991f8c9cd389812 F ext/rbu/test_rbu.c 03f6f177096a5f822d68d8e4069ad8907fe572c62ff2d19b141f59742821828a -F ext/recover/dbdata.c 3ae32f9b7f02a141889b9075beb87895a826d0fcf3b702b8251cbb0dd3c91a83 -F ext/recover/recover1.test 522e2c3353734dbef9118f08e47209470e50308ba35ce818fed00b8e265aee44 -F ext/recover/recover_common.tcl 6679af7dffc858e345053a91c9b0a897595b4a13007aceffafca75304ccb137c -F ext/recover/recoverclobber.test 294dcc894124ab4ca3a7b35766630742a3d25810fceac22220beb64f70a33a60 -F ext/recover/recovercorrupt.test 6540aae95e17398dd70b44518367fd56588c44962cb276d2623a0fedba9efe9e -F ext/recover/recovercorrupt2.test a7e0735cefb79de7959ebd1ee6d963f9505305fe7983ac58394eb5f5aa9236c7 -F ext/recover/recoverfault.test 3a0a32b9fc216592b97775d69220695b0926980c0f7424b7a59144e47d7cb568 -F ext/recover/recoverfault2.test 321036336af23e778a87f148c4cc4407f88fbdab1fd72ddb661669be9020d36b -F ext/recover/recoverold.test 46e9d99b595fac583d4c67f74d7d89c20a435c752ef6eeb3e918b599940c88e0 -F ext/recover/recoverpgsz.test 93e970eab05e4e89f8fd6b1bd23f9ec137ea09857e66ba0d4d27a83cd1ba4a89 -F ext/recover/recoverrowid.test 1694a1a5526d825f71279f3d02ab02a1ee4c5265de18858bf54cb8ec54487ac8 -F ext/recover/recoverslowidx.test f356bb9fba7ffd6fc50e045e419464f0129ac6e24decf6e919584f79c3493727 -F ext/recover/recoversql.test f9872ff2114e13ffd8ee31e1de06919f62b9b48bc080191b5bd076d10becb60f -F ext/recover/sqlite3recover.c d2feca815f489f3beed4af94b916e0cba046937b9cc760b0f2baacf1ae515fa2 +F ext/recover/dbdata.c 1d5353d3af247c4e0656f8f88a80564aa840644c1177212dd11a186dce4ab213 +F ext/recover/recover1.test 5758c1900d8feacbdf9cc1f2796cfcb5715885a33e2ab14bdeeec8b7c938f576 +F ext/recover/recover_common.tcl a61306c1eb45c0c3fc45652c35b2d4ec19729e340bdf65a272ce4c229cefd85a +F ext/recover/recoverclobber.test 3ba6c0c373c5c63d17e82eced64c05c57ccaf26c1abe1ca7141334022a79f32e +F ext/recover/recovercorrupt.test 64c081ad1200ae77b447da99eb724785d6bf71715f394543dc7689642e92bf49 +F ext/recover/recovercorrupt2.test 74bef7dd2d7dd4856f3da21be6e213d27da44827e0f5f0946ca0325b46d163ed +F ext/recover/recoverfault.test 9d9f88eeb222615a25e7514f234c950d46bee20d24cd8db49d8fff8d650dcfe1 +F ext/recover/recoverfault2.test 730e7371bcda769554d15460cb23126abba1be8eca9539ccabf63623e7bb7e09 +F ext/recover/recoverold.test b0eeb4507cb5dba2ba7dfffe4c6e8c82bd14beaf718b227d647f21b5341eb8b4 +F ext/recover/recoverpgsz.test 481abf7d584cd67daa3ab72f65ff943b07c3887d206cc1c73d914b965596d8ca +F ext/recover/recoverrowid.test f948bf4024a5f41b0e21b8af80c60564c5b5d78c05a8d64fc00787715ff9f45f +F ext/recover/recoverslowidx.test 7e1bd4b1a201d94f39da436a9606047a352d7cbad69ac8f4d46495a46e993fe3 +F ext/recover/recoversql.test e66d01f95302a223bcd3fd42b5ee58dc2b53d70afa90b0d00e41e4b8eab20486 +F ext/recover/sqlite3recover.c 3e38f2bd607f6ecd8dc10ed419363448c206791c7ce344e3a2a6848731b9f37c F ext/recover/sqlite3recover.h 011c799f02deb70ab685916f6f538e6bb32c4e0025e79bfd0e24ff9c74820959 -F ext/recover/test_recover.c 61ec931e47abca6b2210f46239cafd9f3060741605e3d3c45a7c7a53f63dd957 +F ext/recover/test_recover.c 1a34e2d04533d919a30ae4d5caeb1643f6684e9ccd7597ca27721d8af81f4ade F ext/repair/README.md 92f5e8aae749a4dae14f02eea8e1bb42d4db2b6ce5e83dbcdd6b1446997e0c15 F ext/repair/checkfreelist.c e21f06995ff4efdc1622dcceaea4dcba2caa83ca2f31a1607b98a8509168a996 F ext/repair/checkindex.c 4383e4469c21e5b9ae321d0d63cec53e981af9d7a6564be6374f0eeb93dfc890 @@ -2054,8 +2054,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 6cdd64a445fe16d547d7bf5ea26dad3ab6d9d5f7d1c2b49fdc9d7a2edaa031c6 -R 4d302e2fe000f7347174d7f20a725958 -U drh -Z 607b13981a898ce53680e748b8acf681 +P cd7e3568a9b0c0f5ef5ca8a29c55cefe2bbad2dbc88a3718a87bb24a8ada3b7f +R bd8a5ca9186cd7d971a738eb8929f158 +U dan +Z 3cd700d63552d3b4d0ea3e514d09d144 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 895f6be651..9acb9ffd75 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -cd7e3568a9b0c0f5ef5ca8a29c55cefe2bbad2dbc88a3718a87bb24a8ada3b7f \ No newline at end of file +06a9dbea40c8a0cdfae6b127a1ce1cba0547acdf1115c087e9b790a78c264b52 \ No newline at end of file