summaryrefslogtreecommitdiff
path: root/mysql-test/t/fulltext.test
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mysql.com>2008-11-28 18:17:13 +0400
committerSergey Vojtovich <svoj@mysql.com>2008-11-28 18:17:13 +0400
commit589ac1cfdcb44818caff300777223eac723dd762 (patch)
tree7afb52b057d40a73647953f863304c5b5c8e4ff1 /mysql-test/t/fulltext.test
parent78119b2d04457abe94f2a0a9f3d887c0eb9210a5 (diff)
downloadmariadb-git-589ac1cfdcb44818caff300777223eac723dd762.tar.gz
BUG#37245 - Full text search problem
Certain boolean mode queries with truncation operator did not return matching records and calculate relevancy incorrectly. myisam/ft_boolean_search.c: Sort ftb->list in ascending order. This helps to fix binary search in ft_boolean_find_relevance() without rewriting it much. Fixed binary search in ft_boolean_find_relevance(), so it finds right-most element in an array. Fixed that ft_boolean_find_relevance() didn't return match for words with truncation operator in case query has other non- matching words. mysql-test/r/fulltext.result: A test case for BUG#37245. mysql-test/t/fulltext.test: A test case for BUG#37245.
Diffstat (limited to 'mysql-test/t/fulltext.test')
-rw-r--r--mysql-test/t/fulltext.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index fa087d89efb..77d84c730d9 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -423,3 +423,12 @@ EXPLAIN SELECT * FROM t1 FORCE INDEX(b)
WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1;
DROP TABLE t1;
+
+#
+# BUG#37245 - Full text search problem
+#
+CREATE TABLE t1(a CHAR(10));
+INSERT INTO t1 VALUES('aaa15');
+SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa16' IN BOOLEAN MODE) FROM t1;
+SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE) FROM t1;
+DROP TABLE t1;