diff --git a/manifest b/manifest index c1f73df7f5..527cab1836 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\s"valgrind"\spermutation.\sThis\sis\sthe\ssame\sas\sveryquick.test\sexcept\sthat\sit\somits\sthe\smulti-process\stests\sthat\sdo\snot\swork\sunder\svalgrind.\sNo\schanges\sto\sproduction\sor\sexisting\stest\scode. -D 2010-12-03T10:32:06 +C Add\stests\sfor\sfts3\sto\sbackcompat.test. +D 2010-12-03T15:04:26 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 4547616ad2286053af6ccccefa242dc925e49bf0 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -269,7 +269,7 @@ F test/autoindex1.test 860fc83f4fefb0c68ad062afc3ff43faa1534fc4 F test/autovacuum.test bb7c0885e6f8f1d633045de48f2b66082162766d F test/autovacuum_ioerr2.test 598b0663074d3673a9c1bc9a16e80971313bafe6 F test/avtrans.test 0252654f4295ddda3b2cce0e894812259e655a85 -F test/backcompat.test 5f3ba113147cfe5620006f457302ec2b95c46913 +F test/backcompat.test 541314d69ec9db3e03630b7616696ddc5048efb1 F test/backup.test 004d3b78bffd990741ab50133ed4347c25c172b1 F test/backup2.test b7c69f937c912e85ac8a5dbd1e1cf290302b2d49 F test/backup_ioerr.test 1f012e692f42c0442ae652443258f70e9f20fa38 @@ -893,7 +893,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 099195b14829f375055345b8322905ccd073d442 -R 12657e4081bbce8f24bac8cf61742cd1 +P 49531300676b303f2ccec8d8d587b389c9eae98b +R cfcb30493f9b700ca917c02b66c4bbdb U dan -Z 711e258ae109ff5e23024862fd405c2d +Z 13986d8a8faf0a59e119a319b30374dc diff --git a/manifest.uuid b/manifest.uuid index f85d10db6b..0df31c0d7d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -49531300676b303f2ccec8d8d587b389c9eae98b \ No newline at end of file +b4eafde823bf30ebbb9232a88c9ddfa52f3cbabf \ No newline at end of file diff --git a/test/backcompat.test b/test/backcompat.test index 0b4c02f7a0..3b11607274 100644 --- a/test/backcompat.test +++ b/test/backcompat.test @@ -271,4 +271,102 @@ do_allbackcompat_test { } } +#------------------------------------------------------------------------- +# Test that FTS3 tables may be read/written by different versions of +# SQLite. +# +set contents { + CREATE VIRTUAL TABLE t1 USING fts3(a, b); +} +foreach {num doc} { + one "jk zm jk eczkjblu urvysbnykk sk gnl jk ttvgf hmjf" + two "jk bnhc jjrxpjkb mjpavjuhw fibokdry igju jk zm zm xh" + three "wxe ogttbykvt uhzq xr iaf zf urvysbnykk aayxpmve oacaxgjoo mjpavjuhw" + four "gazrt jk ephknonq myjp uenvbm wuvajhwqz jk zm xnxhf nvfasfh" + five "zm aayxpmve csjqxhgj xnxhf xr jk aayxpmve xnxhf zm zm" + six "sokcyf zm ogyavjvv jk zm fibokdry zm jk igju igju" + seven "vgsld bvgimjik xuprtlyle jk akmikrqyt jk aayxpmve hkfoudzftq ddjj" + eight "zm uhzq ovkyevlgv zk uenvbm csjqxhgj jk vgsld pgybs jk" + nine "zm agmckuiu zexh fibokdry jk uhzq bu tugflixoex xnxhf sk" +} { + append contents "INSERT INTO t1 VALUES('$num', '$doc');" +} +do_allbackcompat_test { + if {[code1 {set ::sqlite_options(fts3)}] + && [code2 {set ::sqlite_options(fts3)}] + } { + + do_test backcompat-3.1 { sql1 $contents } {} + + foreach {n q} { + 1 "SELECT * FROM t1 ORDER BY a, b" + 2 "SELECT rowid FROM t1 WHERE a MATCH 'five'" + 3 "SELECT * FROM t1 WHERE a MATCH 'five'" + 4 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'jk'" + 5 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'tug* OR eight'" + } { + do_test backcompat-3.2 [list sql1 $q] [sql2 $q] + } + + do_test backcompat-3.3 { sql1 { + INSERT INTO t1 SELECT * FROM t1; + INSERT INTO t1 SELECT * FROM t1; + INSERT INTO t1 SELECT * FROM t1; + INSERT INTO t1 SELECT * FROM t1; + INSERT INTO t1 SELECT * FROM t1; + INSERT INTO t1 SELECT * FROM t1; + INSERT INTO t1 SELECT * FROM t1; + INSERT INTO t1 SELECT * FROM t1; + } } {} + + foreach {n q} { + 1 "SELECT * FROM t1 ORDER BY a, b" + 2 "SELECT rowid FROM t1 WHERE a MATCH 'five'" + 3 "SELECT * FROM t1 WHERE a MATCH 'five'" + 4 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'jk'" + 5 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'tug* OR eight'" + } { + do_test backcompat-3.4 [list sql1 $q] [sql2 $q] + } + + set alphabet "a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4" + for {set i 0} {$i < 900} {incr i} { + set term "[lindex $alphabet [expr $i/30]][lindex $alphabet [expr $i%30]] " + sql1 "INSERT INTO t1 VALUES($i, '[string repeat $term 14]')" + } + + foreach {n q} { + 1 "SELECT * FROM t1 ORDER BY a, b" + 2 "SELECT rowid FROM t1 WHERE a MATCH 'five'" + 3 "SELECT * FROM t1 WHERE a MATCH 'five'" + 4 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'jk'" + 5 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'tug* OR eight'" + + 6 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'aa'" + 7 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH '44'" + 8 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'a*'" + } { + do_test backcompat-3.5 [list sql1 $q] [sql2 $q] + } + + do_test backcompat-3.6 { + sql1 "SELECT optimize(t1) FROM t1 LIMIT 1" + } {{Index optimized}} + + foreach {n q} { + 1 "SELECT * FROM t1 ORDER BY a, b" + 2 "SELECT rowid FROM t1 WHERE a MATCH 'five'" + 3 "SELECT * FROM t1 WHERE a MATCH 'five'" + 4 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'jk'" + 5 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'tug* OR eight'" + + 6 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'aa'" + 7 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH '44'" + 8 "SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'a*'" + } { + do_test backcompat-3.7 [list sql1 $q] [sql2 $q] + } + } +} + finish_test