]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix discrepency in the test pointed out by a user. Was testing fts2 :-). (CVS 4348)
authorshess <shess@noemail.net>
Thu, 30 Aug 2007 20:01:32 +0000 (20:01 +0000)
committershess <shess@noemail.net>
Thu, 30 Aug 2007 20:01:32 +0000 (20:01 +0000)
FossilOrigin-Name: 65c62ed85edd2cb3cf26f01fadf3b342c1e8a20f

manifest
manifest.uuid
test/fts1o.test

index ed6340ae0483a7ee4960b1e15800763104ff1e65..97c997d66bf002cac6e5b8a377715bfe842f1dfb 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\smemory\sleak\sreported\sby\san\sfts1\suser.\s\sWas\slosing\sa\sdoclist\son\sa\nquery\serror.\s(CVS\s4347)
-D 2007-08-30T19:56:38
+C Fix\sdiscrepency\sin\sthe\stest\spointed\sout\sby\sa\suser.\s\sWas\stesting\sfts2\s:-).\s(CVS\s4348)
+D 2007-08-30T20:01:33
 F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -267,7 +267,7 @@ F test/fts1k.test fdf295cb797ba6a2ef81ec41cb98df0ceb2e572c
 F test/fts1l.test 15c119ed2362b2b28d5300c0540a6a43eab66c36
 F test/fts1m.test 2d9ca67b095d49f037a914087cc0a61e89da4f0c
 F test/fts1n.test a2317dcd27b1d087ee3878b30e0a59c593c98b7a
-F test/fts1o.test 81c87d789090daee172f307d9fdafc1e2583d1ce
+F test/fts1o.test 382b8b07a2d6de5610814d9477117c4430464b9c
 F test/fts1porter.test d86e9c3e0c7f8ff95add6582b4b585fb4e02b96d
 F test/fts2a.test 473a5c8b473a4e21a8e3fddaed1e59666e0c6ab7
 F test/fts2b.test 964abc0236c849c07ca1ae496bb25c268ae94816
@@ -568,7 +568,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 293a3f837bd6c6a26f694a9210e59ace23abb6bb
-R 173cd743c09d9b4badf1c69fa1972b1a
+P eee025024972852990e704253d1443c1cefb376c
+R 22bb7f489df69532356733d65729e11a
 U shess
-Z 2021fe976e5f4838f83a977058b33242
+Z 9c84fe5ce7236ca1a106e01233a60397
index a8f65b6b5b1dbe66d90b2506d71e2a88c4f10741..def469ab8699c921aa5c5eed95fd0c9f081a802b 100644 (file)
@@ -1 +1 @@
-eee025024972852990e704253d1443c1cefb376c
\ No newline at end of file
+65c62ed85edd2cb3cf26f01fadf3b342c1e8a20f
\ No newline at end of file
index 6ce7d0f91d7170486acc014e535af113579b66f0..92666c6f50b7740238011c4c673b4737651ccf56 100644 (file)
@@ -12,7 +12,7 @@
 # of this script is testing the FTS1 module rename functionality.  Mostly
 # copied from fts2o.test.
 #
-# $Id: fts1o.test,v 1.1 2007/07/25 00:56:10 shess Exp $
+# $Id: fts1o.test,v 1.2 2007/08/30 20:01:33 shess Exp $
 #
 
 set testdir [file dirname $argv0]
@@ -25,7 +25,7 @@ ifcapable !fts1 {
 }
 
 db eval {
-  CREATE VIRTUAL TABLE t1 USING fts2(a, b, c);
+  CREATE VIRTUAL TABLE t1 USING fts1(a, b, c);
   INSERT INTO t1(a, b, c) VALUES('one three four', 'one four', 'one four two');
 }
 
@@ -34,7 +34,7 @@ db eval {
 #
 do_test fts1o-1.1 {
   execsql { SELECT tbl_name FROM sqlite_master WHERE type = 'table'}
-} {t1 t1_content t1_segments t1_segdir}
+} {t1 t1_content t1_term}
 do_test fts1o-1.2 {
   execsql { ALTER TABLE t1 RENAME to fts_t1; }
 } {}
@@ -43,13 +43,13 @@ do_test fts1o-1.3 {
 } {1 {one three <b>four</b>}}
 do_test fts1o-1.4 {
   execsql { SELECT tbl_name FROM sqlite_master WHERE type = 'table'}
-} {fts_t1 fts_t1_content fts_t1_segments fts_t1_segdir}
+} {fts_t1 fts_t1_content fts_t1_term}
 
 # See what happens when renaming the fts1 table fails.
 #
 do_test fts1o-2.1 {
   catchsql {
-    CREATE TABLE t1_segdir(a, b, c);
+    CREATE TABLE t1_term(a, b, c);
     ALTER TABLE fts_t1 RENAME to t1;
   }
 } {1 {SQL logic error or missing database}}
@@ -58,7 +58,7 @@ do_test fts1o-2.2 {
 } {1 {one three <b>four</b>}}
 do_test fts1o-2.3 {
   execsql { SELECT tbl_name FROM sqlite_master WHERE type = 'table'}
-} {fts_t1 fts_t1_content fts_t1_segments fts_t1_segdir t1_segdir}
+} {fts_t1 fts_t1_content fts_t1_term t1_term}
 
 # See what happens when renaming the fts1 table fails inside a transaction.
 #
@@ -73,12 +73,16 @@ do_test fts1o-3.2 {
     ALTER TABLE fts_t1 RENAME to t1;
   }
 } {1 {SQL logic error or missing database}}
+# NOTE(shess) rowid AS rowid to defeat caching.  Otherwise, this
+# seg-faults, I suspect that there's something up with a stale
+# virtual-table reference, but I'm not quite sure how it happens here
+# but not for fts2o.test.
 do_test fts1o-3.3 {
-  execsql { SELECT rowid, snippet(fts_t1) FROM fts_t1 WHERE a MATCH 'four'; }
+  execsql { SELECT rowid AS rowid, snippet(fts_t1) FROM fts_t1 WHERE a MATCH 'four'; }
 } {1 {one three <b>four</b>}}
 do_test fts1o-3.4 {
   execsql { SELECT tbl_name FROM sqlite_master WHERE type = 'table'}
-} {fts_t1 fts_t1_content fts_t1_segments fts_t1_segdir t1_segdir}
+} {fts_t1 fts_t1_content fts_t1_term t1_term}
 do_test fts1o-3.5 {
   execsql COMMIT
   execsql {SELECT a FROM fts_t1}
@@ -95,7 +99,7 @@ file delete -force test2.db test2.db-journal
 
 do_test fts1o-4.1 {
   execsql {
-    DROP TABLE t1_segdir;
+    DROP TABLE t1_term;
     ALTER TABLE fts_t1 RENAME to t1;
     SELECT a, b, c FROM t1 WHERE c MATCH 'two';
   }