summaryrefslogtreecommitdiff
path: root/mysql-test/t/fulltext.test
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com/april.(none)>2007-07-13 03:25:27 +0500
committerunknown <svoj@mysql.com/april.(none)>2007-07-13 03:25:27 +0500
commit62738bf97e7a653030361f0dcedf0f4a5c97388d (patch)
tree8b756f4a33c9a0e00ed02b2c4753aab9d9b2879f /mysql-test/t/fulltext.test
parent847d6ed75bf396eeccef04205822c6314ff55065 (diff)
downloadmariadb-git-62738bf97e7a653030361f0dcedf0f4a5c97388d.tar.gz
BUG#29445 - match ... against () never returns
Part 2: Searching fulltext index for a word with boolean mode truncation operator may cause infinite loop. The problem was that "smarter index merge" was used with "trunc-words", which must never happen. Affects 5.1 only. mysql-test/r/fulltext.result: Addition to a test case for BUG#29445. mysql-test/t/fulltext.test: Addition to a test case for BUG#29445. storage/myisam/ft_boolean_search.c: Fulltext "smarter index merge" optimization assumes that rows it gets are ordered by doc_id. That is not the case when we search for a word with truncation operator. It may return rows in random order. Thus we may not use "smarter index merge" optimization with "trunc-words". Also fixed compiler warning introduced by Part 1 patch.
Diffstat (limited to 'mysql-test/t/fulltext.test')
-rw-r--r--mysql-test/t/fulltext.test3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index b1bf0036c70..ecb4a0e5691 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -414,7 +414,8 @@ DROP TABLE t1;
CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a));
INSERT INTO t1 VALUES('Offside'),('City Of God');
SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE);
-SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of)*' IN BOOLEAN MODE);
+SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of*)' IN BOOLEAN MODE);
+SELECT a FROM t1 WHERE MATCH a AGAINST ('+city* of*' IN BOOLEAN MODE);
DROP TABLE t1;
# End of 4.1 tests