MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:July 10 2007 10:37am
Subject:bk commit into 5.1 tree (svoj:1.2538) BUG#29445
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of svoj. When svoj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-07-10 15:37:39+05:00, svoj@stripped +3 -0
  BUG#29445 - match ... against () never returns
  
  Part 1:
  Do not perform index search for a plus-word with truncation operator
  in case there are other plus-words in expression.
  
  Specifically this optimization was enforced for expression like
  "+word1 +word2*", but wasn't enforced for expression like
  "+word1 word2*".

  mysql-test/r/fulltext.result@stripped, 2007-07-10 15:37:37+05:00, svoj@stripped +6 -0
    A test case for BUG#29445.

  mysql-test/t/fulltext.test@stripped, 2007-07-10 15:37:37+05:00, svoj@stripped +8 -0
    A test case for BUG#29445.

  storage/myisam/ft_boolean_search.c@stripped, 2007-07-10 15:37:37+05:00, svoj@stripped +2 -1
    Do not perform index search for a plus-word with truncation operator
    in case there are other plus-words in expression.
    
    Specifically this optimization was enforced for expression like
    "+word1 +word2*", but wasn't enforced for expression like
    "+word1 word2*".

diff -Nrup a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
--- a/mysql-test/r/fulltext.result	2007-07-05 15:17:04 +05:00
+++ b/mysql-test/r/fulltext.result	2007-07-10 15:37:37 +05:00
@@ -480,3 +480,9 @@ CREATE TABLE t1(a VARCHAR(2) CHARACTER S
 FULLTEXT(a));
 INSERT INTO t1 VALUES(0xA3C2);
 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);
+a
+City Of God
+DROP TABLE t1;
diff -Nrup a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
--- a/mysql-test/t/fulltext.test	2007-07-05 15:17:04 +05:00
+++ b/mysql-test/t/fulltext.test	2007-07-10 15:37:37 +05:00
@@ -408,4 +408,12 @@ FULLTEXT(a));
 INSERT INTO t1 VALUES(0xA3C2);
 DROP TABLE t1;
 
+#
+# BUG#29445 - match ... against () never returns
+#
+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);
+DROP TABLE t1;
+
 # End of 4.1 tests
diff -Nrup a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c
--- a/storage/myisam/ft_boolean_search.c	2007-06-01 00:28:00 +05:00
+++ b/storage/myisam/ft_boolean_search.c	2007-07-10 15:37:37 +05:00
@@ -474,7 +474,8 @@ static void _ftb_init_index_search(FT_IN
            ftbe->up->flags|= FTB_FLAG_TRUNC, ftbe=ftbe->up)
       {
         if (ftbe->flags & FTB_FLAG_NO ||                     /* 2 */
-             ftbe->up->ythresh - ftbe->up->yweaks >1)        /* 1 */
+            ftbe->up->ythresh - ftbe->up->yweaks >
+            test(ftbe->flags & FTB_FLAG_YES))                /* 1 */
         {
           FTB_EXPR *top_ftbe=ftbe->up;
           ftbw->docid[0]=HA_OFFSET_ERROR;
Thread
bk commit into 5.1 tree (svoj:1.2538) BUG#29445Sergey Vojtovich10 Jul
  • Re: bk commit into 5.1 tree (svoj:1.2538) BUG#29445Sergei Golubchik10 Jul