diff options
author | Sergey Vojtovich <svoj@sun.com> | 2010-02-02 15:08:49 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2010-02-02 15:08:49 +0400 |
commit | dac9e51811a6c4cee0a4ab127f4d264d80a07962 (patch) | |
tree | 9bc94d6dd78b23d3ce99ca324e4259942ff61cc2 /mysql-test/r/fulltext.result | |
parent | 1750b79fd15e0ebc95a29123c18053fb7154ea3c (diff) | |
download | mariadb-git-dac9e51811a6c4cee0a4ab127f4d264d80a07962.tar.gz |
BUG#50351 - ft_min_word_len=2 Causes query to hang
Performing fulltext prefix search (a word with truncation
operator) may cause a dead-loop. ft_min_word_len value
doesn't matter actually.
The problem was introduced along with "smarter index merge"
optimization.
mysql-test/r/fulltext.result:
A test case for BUG#50351.
mysql-test/t/fulltext.test:
A test case for BUG#50351.
storage/myisam/ft_boolean_search.c:
When going up to first-level tree, we need to restore docid[0],
so it informs fulltext index merge not to enter this second-level
tree again (avoiding dead-loop).
Diffstat (limited to 'mysql-test/r/fulltext.result')
-rw-r--r-- | mysql-test/r/fulltext.result | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 1ef6656e7a4..cebe2ee4746 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -603,4 +603,24 @@ WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE) count(*) 0 DROP TABLE t1,t2,t3; +CREATE TABLE t1 (a VARCHAR(4), FULLTEXT(a)); +INSERT INTO t1 VALUES +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'), +('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('cwrd'),('awrd'),('cwrd'), +('awrd'); +SELECT COUNT(*) FROM t1 WHERE MATCH(a) AGAINST("+awrd bwrd* +cwrd*" IN BOOLEAN MODE); +COUNT(*) +0 +DROP TABLE t1; End of 5.1 tests |