From: dan Date: Tue, 27 Mar 2012 15:10:50 +0000 (+0000) Subject: Really delete the fts3merge.test script (should have been deleted by the previous... X-Git-Tag: mountain-lion~3^2~9^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b16fb0423430afbb4e874ddecb8aa8e4fd9174d;p=thirdparty%2Fsqlite.git Really delete the fts3merge.test script (should have been deleted by the previous commit). FossilOrigin-Name: 83838149d9dd7956c5f48f760c2f321180d2db5f --- diff --git a/manifest b/manifest index a666fe4095..61f584f692 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\sthe\sfts3merge.test\sscript\sin\sfavour\sof\schanging\sthe\sfts4merge.test\sscript\sso\sthat\sit\sruns\stests\susing\sboth\sfts4\sand\sfts3.\sFix\ssome\sproblems\swith\sincr-merge\sand\sFTS3\stables. -D 2012-03-27T15:00:06.725 +C Really\sdelete\sthe\sfts3merge.test\sscript\s(should\shave\sbeen\sdeleted\sby\sthe\sprevious\scommit). +D 2012-03-27T15:10:50.636 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 2f37e468503dbe79d35c9f6dffcf3fae1ae9ec20 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -488,7 +488,6 @@ F test/fts3fault2.test b62a2bc843c20414405f80e5eeb78e39bc68fe53 F test/fts3first.test dbdedd20914c8d539aa3206c9b34a23775644641 F test/fts3malloc.test b86ea33db9e8c58c0c2f8027a9fcadaf6a1568be F test/fts3matchinfo.test 6507fe1c342e542300d65ea637d4110eccf894e6 -F test/fts3merge.test acb0be43658029565e7b448f8968149de80549d7 F test/fts3near.test 2e318ee434d32babd27c167142e2b94ddbab4844 F test/fts3prefix.test b36d4f00b128a51e7b386cc013a874246d9d7dc1 F test/fts3prefix2.test 477ca96e67f60745b7ac931cfa6e9b080c562da5 @@ -1000,7 +999,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 -P 04aea0245e4183fef3664609f5a6353b65d71a85 -R b8c319973c3298c33d22a9e309ade35c +P 5c447e226afca0d46b9ed994dea26a16a9ae168c +R 5d18089d511e28a909d4de9046e3cbed U dan -Z fbf5edaf3f2b7351822253f4d48708a9 +Z f30e1777f0eaeb639d51fafd86db0092 diff --git a/manifest.uuid b/manifest.uuid index d4a6a25e2f..e67e18a6c4 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -5c447e226afca0d46b9ed994dea26a16a9ae168c \ No newline at end of file +83838149d9dd7956c5f48f760c2f321180d2db5f \ No newline at end of file diff --git a/test/fts3merge.test b/test/fts3merge.test deleted file mode 100644 index a0854fa1a4..0000000000 --- a/test/fts3merge.test +++ /dev/null @@ -1,330 +0,0 @@ -# 2012 March 06 -# -# 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. -# -#************************************************************************* -# This file implements regression tests for SQLite library. The -# focus of this script is testing the incremental merge function. -# - -set testdir [file dirname $argv0] -source $testdir/tester.tcl -source $testdir/fts3_common.tcl -set ::testprefix fts3merge - -# If SQLITE_ENABLE_FTS3 is defined, omit this file. -ifcapable !fts3 { - finish_test - return -} - -#------------------------------------------------------------------------- -# Test cases 1.* -# -do_test 1.0 { fts3_build_db_1 1004 } {} -do_test 1.1 { fts3_integrity_check t1 } {ok} -do_execsql_test 1.1 { - SELECT level, group_concat(idx, ' ') FROM t1_segdir GROUP BY level -} { - 0 {0 1 2 3 4 5 6 7 8 9 10 11} - 1 {0 1 2 3 4 5 6 7 8 9 10 11 12 13} - 2 {0 1 2} -} - -for {set i 0} {$i<20} {incr i} { - do_execsql_test 1.2.$i.1 { INSERT INTO t1(t1) VALUES('merge=1') } - do_test 1.2.$i.2 { fts3_integrity_check t1 } ok - do_execsql_test 1.2.$i.3 { - SELECT docid FROM t1 WHERE t1 MATCH 'zero one two three' - } {123 132 213 231 312 321} -} - -do_execsql_test 1.3 { - SELECT level, group_concat(idx, ' ') FROM t1_segdir GROUP BY level -} { - 0 {0 1 2 3} - 1 {0 1 2 3 4 5 6} - 2 {0 1 2 3} -} - -for {set i 0} {$i<100} {incr i} { - do_execsql_test 1.4.$i { INSERT INTO t1(t1) VALUES('merge=1,4') } - do_test 1.4.$i.2 { fts3_integrity_check t1 } ok - do_execsql_test 1.4.$i.3 { - SELECT docid FROM t1 WHERE t1 MATCH 'zero one two three' - } {123 132 213 231 312 321} -} - -do_execsql_test 1.5 { - SELECT level, group_concat(idx, ' ') FROM t1_segdir GROUP BY level -} { - 2 {0 1} - 3 0 -} - -#------------------------------------------------------------------------- -# Test cases 2.* test that errors in the xxx part of the 'merge=xxx' are -# handled correctly. -# -do_execsql_test 2.0 { CREATE VIRTUAL TABLE t2 USING fts3 } - -foreach {tn arg} { - 1 {merge=abc} - 2 {merge=%%%} - 3 {merge=,} - 4 {merge=5,} - 5 {merge=6,%} - 6 {merge=6,six} - 7 {merge=6,1} - 8 {merge=6,0} -} { - do_catchsql_test 2.$tn { - INSERT INTO t2(t2) VALUES($arg); - } {1 {SQL logic error or missing database}} -} - -#------------------------------------------------------------------------- -# Test cases 3.* -# -do_test 3.0 { - reset_db - execsql { PRAGMA page_size = 512 } - fts3_build_db_2 30040 -} {} -do_test 3.1 { fts3_integrity_check t2 } {ok} - -do_execsql_test 3.2 { - SELECT level, group_concat(idx, ' ') FROM t2_segdir GROUP BY level -} { - 0 {0 1 2 3 4 5 6} - 1 {0 1 2 3 4} - 2 {0 1 2 3 4} - 3 {0 1 2 3 4 5 6} -} - -do_execsql_test 3.3 { - INSERT INTO t2(t2) VALUES('merge=1000000,2'); - SELECT level, group_concat(idx, ' ') FROM t2_segdir GROUP BY level -} { - 0 0 - 2 0 - 3 0 - 4 0 - 6 0 -} - -#------------------------------------------------------------------------- -# Test cases 4.* -# -reset_db -do_execsql_test 4.1 { - PRAGMA page_size = 512; - CREATE VIRTUAL TABLE t4 USING fts3; - PRAGMA main.page_size; -} {512} - -do_test 4.2 { - foreach x {a c b d e f g h i j k l m n o p} { - execsql "INSERT INTO t4 VALUES('[string repeat $x 600]')" - } - execsql {SELECT level, group_concat(idx, ' ') FROM t4_segdir GROUP BY level} -} {0 {0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15}} - -foreach {tn expect} { - 1 "0 {0 1 2 3 4 5 6 7 8 9 10 11 12 13} 1 0" - 2 "0 {0 1 2 3 4 5 6 7 8 9 10 11 12} 1 0" - 3 "0 {0 1 2 3 4 5 6 7 8 9 10 11} 1 0" - 4 "0 {0 1 2 3 4 5 6 7 8 9 10} 1 0" - 5 "0 {0 1 2 3 4 5 6 7 8 9} 1 0" - 6 "0 {0 1 2 3 4 5 6 7 8} 1 0" - 7 "0 {0 1 2 3 4 5 6 7} 1 0" - 8 "0 {0 1 2 3 4 5 6} 1 0" - 9 "0 {0 1 2 3 4 5} 1 0" -} { - do_execsql_test 4.3.$tn { - INSERT INTO t4(t4) VALUES('merge=1,16'); - SELECT level, group_concat(idx, ' ') FROM t4_segdir GROUP BY level; - } $expect -} - -do_execsql_test 4.4.1 { - SELECT quote(value) FROM t4_stat WHERE rowid=1 -} {X'0006'} - -do_execsql_test 4.4.2 { - DELETE FROM t4_stat WHERE rowid=1; - INSERT INTO t4(t4) VALUES('merge=1,12'); - SELECT level, group_concat(idx, ' ') FROM t4_segdir GROUP BY level; -} "0 {0 1 2 3 4 5} 1 0" - - -#------------------------------------------------------------------------- -# Test cases 5.* -# -# Test that if a crisis-merge occurs that disrupts an ongoing incremental -# merge, the next call to "merge=A,B" identifies this and starts a new -# incremental merge. There are two scenarios: -# -# * There are less segments on the input level that the disrupted -# incremental merge operated on, or -# -# * Sufficient segments exist on the input level but the segments -# contain keys smaller than the largest key in the potential output -# segment. -# -do_test 5.1 { - reset_db - fts3_build_db_1 1000 -} {} - -do_execsql_test 5.2 { - SELECT level, group_concat(idx, ' ') FROM t1_segdir GROUP BY level; -} { - 0 {0 1 2 3 4 5 6 7} - 1 {0 1 2 3 4 5 6 7 8 9 10 11 12 13} - 2 {0 1 2} -} - -do_execsql_test 5.3 { - INSERT INTO t1(t1) VALUES('merge=1,4'); - SELECT level, group_concat(idx, ' ') FROM t1_segdir GROUP BY level; -} { - 0 {0 1 2 3 4 5 6 7} - 1 {0 1 2 3 4 5 6 7 8 9 10 11 12 13} - 2 {0 1 2 3} -} - -do_execsql_test 5.4 {SELECT quote(value) from t1_stat WHERE rowid=1} {X'0104'} -do_test 5.5 { - foreach docid [execsql {SELECT docid FROM t1}] { - execsql {INSERT INTO t1 SELECT * FROM t1 WHERE docid=$docid} - } -} {} - -do_execsql_test 5.6 {SELECT quote(value) from t1_stat WHERE rowid=1} {X'0104'} - -do_execsql_test 5.7 { - SELECT level, group_concat(idx, ' ') FROM t1_segdir GROUP BY level; - SELECT quote(value) from t1_stat WHERE rowid=1; -} { - 0 {0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15} - 1 {0 1 2 3 4 5 6 7 8 9 10 11} - 2 {0 1 2 3 4 5 6 7} - X'0104' -} - -do_execsql_test 5.8 { - INSERT INTO t1(t1) VALUES('merge=1,4'); - SELECT level, group_concat(idx, ' ') FROM t1_segdir GROUP BY level; - SELECT quote(value) from t1_stat WHERE rowid=1; -} { - 0 {0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15} - 1 {0 1 2 3 4 5 6 7 8 9 10 11} - 2 {0 1 2 3 4 5 6 7} - 3 {0} - X'0204' -} - -do_test 5.9 { - set L [expr 16*16*8 + 16*4 + 1] - foreach docid [execsql { - SELECT docid FROM t1 UNION ALL SELECT docid FROM t1 LIMIT $L - }] { - execsql {INSERT INTO t1 SELECT * FROM t1 WHERE docid=$docid} - } -} {} - -do_execsql_test 5.10 { - SELECT level, group_concat(idx, ' ') FROM t1_segdir GROUP BY level; - SELECT quote(value) from t1_stat WHERE rowid=1; -} { - 0 0 1 0 2 0 3 {0 1} - X'0204' -} - -do_execsql_test 5.11 { - INSERT INTO t1(t1) VALUES('merge=10,4'); - SELECT level, group_concat(idx, ' ') FROM t1_segdir GROUP BY level; - SELECT quote(value) from t1_stat WHERE rowid=1; -} { - 0 0 1 0 2 0 3 {0 1} - X'0000' -} - -#------------------------------------------------------------------------- -# Test cases 6.* -# -# At one point the following test caused an assert() to fail (because the -# second 'merge=1,2' operation below actually "merges" a single input -# segment, which was unexpected). -# -do_test 6.1 { - reset_db - set a [string repeat a 900] - set b [string repeat b 900] - set c [string repeat c 900] - set d [string repeat d 900] - execsql { - CREATE VIRTUAL TABLE t1 USING fts3; - BEGIN; - INSERT INTO t1 VALUES($a); - INSERT INTO t1 VALUES($b); - COMMIT; - BEGIN; - INSERT INTO t1 VALUES($c); - INSERT INTO t1 VALUES($d); - COMMIT; - } - - execsql { - INSERT INTO t1(t1) VALUES('merge=1,2'); - INSERT INTO t1(t1) VALUES('merge=1,2'); - } -} {} - -#------------------------------------------------------------------------- -# Test cases 7.* -# -# Test that the value returned by sqlite3_total_changes() increases by -# 1 following a no-op "merge=A,B", or by more than 1 if actual work is -# performed. -# -do_test 7.0 { - reset_db - fts3_build_db_1 1000 -} {} - -do_execsql_test 7.1 { - SELECT level, group_concat(idx, ' ') FROM t1_segdir GROUP BY level -} { - 0 {0 1 2 3 4 5 6 7} - 1 {0 1 2 3 4 5 6 7 8 9 10 11 12 13} - 2 {0 1 2} -} -do_test 7.2 { - set x [db total_changes] - execsql { INSERT INTO t1(t1) VALUES('merge=2,10') } - expr { ([db total_changes] - $x)>1 } -} {1} -do_test 7.3 { - set x [db total_changes] - execsql { INSERT INTO t1(t1) VALUES('merge=200,10') } - expr { ([db total_changes] - $x)>1 } -} {1} -do_test 7.4 { - set x [db total_changes] - execsql { INSERT INTO t1(t1) VALUES('merge=200,10') } - expr { ([db total_changes] - $x)>1 } -} {0} -do_test 7.5 { - set x [db total_changes] - execsql { INSERT INTO t1(t1) VALUES('merge=200,10') } - expr { ([db total_changes] - $x)>1 } -} {0} - -finish_test