From: dan Date: Sun, 22 Oct 2017 07:57:29 +0000 (+0000) Subject: Avoid running tests that use sqlite_dbpage with SQLITE_OMIT_VIRTUAL_TABLE X-Git-Tag: version-3.21.0~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9499b4a6143b9464fa27e25dddd6a5301ab352de;p=thirdparty%2Fsqlite.git Avoid running tests that use sqlite_dbpage with SQLITE_OMIT_VIRTUAL_TABLE builds. FossilOrigin-Name: 7bd20a20a0f422765a6e469d1a1b67b95c4a441931688e04a2b1b491a5238528 --- diff --git a/manifest b/manifest index da985ae44f..07fa1c88b3 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Catch\sand\savoid\sa\s16-bit\sinteger\soverflow\son\sthe\snumber\sof\scolumns\sin\sa\ncommon\stable\sexpression.\s\sThis\sfixes\sa\sproblem\sfound\sby\sOSS-Fuzz.\s\sThe\ntest\scase\sis\sin\sTH3. -D 2017-10-21T14:17:31.555 +C Avoid\srunning\stests\sthat\suse\ssqlite_dbpage\swith\sSQLITE_OMIT_VIRTUAL_TABLE\nbuilds. +D 2017-10-22T07:57:29.038 F Makefile.in e016061b23e60ac9ec27c65cb577292b6bde0307ca55abd874ab3487b3b1beb2 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 37740aba9c4bb359c627eadccf1cfd7be4f5f847078723777ea7763969e533b1 @@ -690,7 +690,7 @@ F test/corruptG.test adf79b669cbfd19e28c8191a610d083ae53a6d51 F test/corruptH.test 79801d97ec5c2f9f3c87739aa1ec2eb786f96454 F test/corruptI.test 075fe1d75aa1d84e2949be56b6264376c41502e4 F test/corruptJ.test 4d5ccc4bf959464229a836d60142831ef76a5aa4 -F test/corruptK.test 251ef631d095e882d455d2183961fa9ba879b4156e18e96c5d2b84aa7ef5f7a9 +F test/corruptK.test d93f5797bf0555a47dcc81bc9727cb72fa7c8ac348c25f42937573cd29bb3850 F test/cost.test 1eedbfd868f806f3fa08ff072b04cf270dcf61c8 F test/count.test cb2e0f934c6eb33670044520748d2ecccd46259c F test/coveridxscan.test b629e896b14df2f000a99b8d170d80589c46562c @@ -1664,7 +1664,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 6ec82acde81a46a75ed5931fc7dd813f2523753106ad7b8f0b544b9da9824d5a -R 201775ba1e14aa2d5f8d0e57defde230 -U drh -Z bad3386d6737a5472f5b033811b6e996 +P 6ee8cb6ae5fd076ec226bb184b5690ba29f9df8cfaef47aaf13336873b4c1f6c +R 2ad0f857ce1c547a47a99955708ad02e +U dan +Z 31291a1d9ccb37db331d41df009b953d diff --git a/manifest.uuid b/manifest.uuid index 60279d9206..321fef9696 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6ee8cb6ae5fd076ec226bb184b5690ba29f9df8cfaef47aaf13336873b4c1f6c \ No newline at end of file +7bd20a20a0f422765a6e469d1a1b67b95c4a441931688e04a2b1b491a5238528 \ No newline at end of file diff --git a/test/corruptK.test b/test/corruptK.test index b921176974..05465a9b5f 100644 --- a/test/corruptK.test +++ b/test/corruptK.test @@ -109,113 +109,117 @@ do_catchsql_test 2.3 { #------------------------------------------------------------------------- -proc hex2blob {hex} { - # Split on newlines: - set bytes [list] - foreach l [split $hex "\n"] { - if {[string is space $l]} continue - set L [list] - foreach b [split $l] { - if {[string is xdigit $b] && [string length $b]==2} { - lappend L [expr "0x$b"] +ifcapable vtab { + + proc hex2blob {hex} { + # Split on newlines: + set bytes [list] + foreach l [split $hex "\n"] { + if {[string is space $l]} continue + set L [list] + foreach b [split $l] { + if {[string is xdigit $b] && [string length $b]==2} { + lappend L [expr "0x$b"] + } } + if {[llength $L]!=16} { + error "Badly formed hex (1)" + } + set bytes [concat $bytes $L] } - if {[llength $L]!=16} { - error "Badly formed hex (1)" - } - set bytes [concat $bytes $L] + + binary format c* $bytes } + + reset_db + db func hex2blob hex2blob + + do_execsql_test 3.1 { + PRAGMA page_size=1024; + CREATE TABLE t1(a, b, c); + CREATE TABLE t2(a, b, c); + CREATE TABLE t3(a, b, c); + CREATE TABLE t4(a, b, c); + CREATE TABLE t5(a, b, c); + } + + do_execsql_test 3.2 { + UPDATE sqlite_dbpage SET data = hex2blob(' + 000: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3. + 010: 04 00 01 01 20 40 20 20 00 00 3e d9 00 00 00 06 .... @ ..>..... + 020: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 04 ................ + 030: 0f 00 00 00 00 00 00 00 00 00 00 01 00 00 83 00 ................ + 040: 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 .............8.. + 050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3e d9 ..............>. + 060: 00 2d e6 07 0d 00 00 00 01 03 a0 00 03 e0 00 00 .-.............. + 070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0d0: 00 00 00 00 00 c1 00 00 00 00 00 00 00 00 00 00 ................ + 0e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 160: 00 83 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 180: 00 00 00 00 00 00 00 00 00 00 07 00 30 00 00 00 ............0... + 190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 1a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 1b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 1c0: 02 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 ................ + 1d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 1e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 1f0: 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 220: 00 00 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 230: 0c 00 00 00 00 00 00 60 00 00 00 06 00 00 c3 00 .......`........ + 240: 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 270: 00 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 290: 04 00 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 2a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 2b0: 00 00 00 00 83 00 8c 00 00 00 00 00 00 00 00 00 ................ + 2c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 2d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 2e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 2f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 310: 00 78 00 00 00 00 00 00 00 00 00 00 00 00 70 00 .x............p. + 320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 340: 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 350: 00 00 00 00 00 68 00 00 00 00 00 00 00 00 00 00 .....h.......... + 360: 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 ................ + 370: 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 ................ + 380: 00 00 00 00 70 00 00 00 00 00 00 00 00 00 00 00 ....p........... + 390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 3a0: 5e 01 07 17 1b 1b 01 81 13 74 61 62 6c 65 73 65 ^........tablese + 3b0: 6e 73 6f 32 73 73 65 6e 73 6f 72 73 02 43 52 45 nso2ssensors.CRE + 3c0: 41 54 45 20 54 41 42 4c 45 20 73 65 6e 73 6f 72 ATE TABLE sensor + 3d0: 73 20 0a 20 20 24 20 20 20 20 20 20 20 20 20 20 s . $ + 3e0: b8 6e 61 6d 65 21 74 65 78 74 2c 20 79 61 6c 20 .name!text, yal + 3f0: 72 65 61 6c 2c 20 74 69 6d 65 20 74 65 78 74 29 real, time text) + ') WHERE pgno=1 + } + + db close + sqlite3 db test.db + + do_catchsql_test 3.3 { + PRAGMA integrity_check; + } {1 {database disk image is malformed}} - binary format c* $bytes -} - -reset_db -db func hex2blob hex2blob - -do_execsql_test 3.1 { - PRAGMA page_size=1024; - CREATE TABLE t1(a, b, c); - CREATE TABLE t2(a, b, c); - CREATE TABLE t3(a, b, c); - CREATE TABLE t4(a, b, c); - CREATE TABLE t5(a, b, c); -} - -do_execsql_test 3.2 { - UPDATE sqlite_dbpage SET data = hex2blob(' - 000: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3. - 010: 04 00 01 01 20 40 20 20 00 00 3e d9 00 00 00 06 .... @ ..>..... - 020: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 04 ................ - 030: 0f 00 00 00 00 00 00 00 00 00 00 01 00 00 83 00 ................ - 040: 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 .............8.. - 050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3e d9 ..............>. - 060: 00 2d e6 07 0d 00 00 00 01 03 a0 00 03 e0 00 00 .-.............. - 070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 0a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 0b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 0c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 0d0: 00 00 00 00 00 c1 00 00 00 00 00 00 00 00 00 00 ................ - 0e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 0f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 160: 00 83 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 180: 00 00 00 00 00 00 00 00 00 00 07 00 30 00 00 00 ............0... - 190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 1a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 1b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 1c0: 02 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 ................ - 1d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 1e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 1f0: 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 220: 00 00 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 230: 0c 00 00 00 00 00 00 60 00 00 00 06 00 00 c3 00 .......`........ - 240: 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 270: 00 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 290: 04 00 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 2a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 2b0: 00 00 00 00 83 00 8c 00 00 00 00 00 00 00 00 00 ................ - 2c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 2d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 2e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 2f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 310: 00 78 00 00 00 00 00 00 00 00 00 00 00 00 70 00 .x............p. - 320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 340: 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 350: 00 00 00 00 00 68 00 00 00 00 00 00 00 00 00 00 .....h.......... - 360: 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 ................ - 370: 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 ................ - 380: 00 00 00 00 70 00 00 00 00 00 00 00 00 00 00 00 ....p........... - 390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - 3a0: 5e 01 07 17 1b 1b 01 81 13 74 61 62 6c 65 73 65 ^........tablese - 3b0: 6e 73 6f 32 73 73 65 6e 73 6f 72 73 02 43 52 45 nso2ssensors.CRE - 3c0: 41 54 45 20 54 41 42 4c 45 20 73 65 6e 73 6f 72 ATE TABLE sensor - 3d0: 73 20 0a 20 20 24 20 20 20 20 20 20 20 20 20 20 s . $ - 3e0: b8 6e 61 6d 65 21 74 65 78 74 2c 20 79 61 6c 20 .name!text, yal - 3f0: 72 65 61 6c 2c 20 74 69 6d 65 20 74 65 78 74 29 real, time text) - ') WHERE pgno=1 -} - -db close -sqlite3 db test.db - -do_catchsql_test 3.3 { - PRAGMA integrity_check; -} {1 {database disk image is malformed}} +} ;# ifcapable vtab