|
If I remove the LIMIT 1 and include the MATCH expression in the output, we see that the returned row indeed is the best match, and everything else comes second:
|
10.4 228b7e4db59441656abfb194da0e239fd091cfd0
|
+rank id title body
|
+0.000000003771856604828372 6 MySQL Security When configured properly, MySQL ...
|
+0.000000001885928302414186 1 MySQL Tutorial DBMS stands for DataBase ...
|
+0.000000001885928302414186 2 How To Use MySQL Well After you went through a ...
|
+0.000000001885928302414186 3 Optimizing MySQL In this tutorial we will show ...
|
+0.000000001885928302414186 4 1001 MySQL Tricks 1. Never run mysqld as root. 2. ...
|
+0.000000001885928302414186 5 MySQL vs. YourSQL In the following database comparison ...
|
This is the patch that I applied:
diff --git a/mysql-test/suite/innodb_fts/t/limit_union.test b/mysql-test/suite/innodb_fts/t/limit_union.test
|
index 71c9af6929e..f2a26be0936 100644
|
--- a/mysql-test/suite/innodb_fts/t/limit_union.test
|
+++ b/mysql-test/suite/innodb_fts/t/limit_union.test
|
@@ -29,9 +29,10 @@ SELECT * FROM articles
|
--echo # Without optimization
|
SET @save_dbug = @@debug_dbug;
|
SET debug_dbug = '+d,fts_union_limit_off';
|
-SELECT * FROM articles
|
+SELECT MATCH (title,body)
|
+ AGAINST ('MySQL' IN NATURAL LANGUAGE MODE) rank, articles.* FROM articles
|
WHERE MATCH (title,body)
|
- AGAINST ('MySQL' IN NATURAL LANGUAGE MODE) LIMIT 1;
|
+ AGAINST ('MySQL' IN NATURAL LANGUAGE MODE);
|
SET debug_dbug = @save_dbug;
|
|
--echo # Query involves No Ranking and fts_union operations
|
thiru, can you please analyze this?
|