MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:July 12 2007 11:43am
Subject:bk commit into 5.1 tree (svoj:1.2544) 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-12 16:43:19+05:00, svoj@stripped +3 -0
  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@stripped, 2007-07-12 16:43:18+05:00, svoj@stripped +4 -1
    Addition to a test case for BUG#29445.

  mysql-test/t/fulltext.test@stripped, 2007-07-12 16:43:18+05:00, svoj@stripped +2 -1
    Addition to a test case for BUG#29445.

  storage/myisam/ft_boolean_search.c@stripped, 2007-07-12 16:43:18+05:00, svoj@stripped +1 -1
    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".

diff -Nrup a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
--- a/mysql-test/r/fulltext.result	2007-07-11 18:26:09 +05:00
+++ b/mysql-test/r/fulltext.result	2007-07-12 16:43:18 +05:00
@@ -485,7 +485,10 @@ INSERT INTO t1 VALUES('Offside'),('City 
 SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE);
 a
 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);
+a
+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-11 18:26:09 +05:00
+++ b/mysql-test/t/fulltext.test	2007-07-12 16:43:18 +05:00
@@ -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
diff -Nrup a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c
--- a/storage/myisam/ft_boolean_search.c	2007-07-11 18:26:09 +05:00
+++ b/storage/myisam/ft_boolean_search.c	2007-07-12 16:43:18 +05:00
@@ -443,7 +443,7 @@ static int _ft2_search(FTB *ftb, FTB_WOR
     memcpy(lastkey_buf+off, info->lastkey, info->lastkey_length);
   }
   ftbw->docid[0]=info->lastpos;
-  if (ftbw->flags & FTB_FLAG_YES)
+  if (ftbw->flags & FTB_FLAG_YES && !(ftbw->flags & FTB_FLAG_TRUNC))
     ftbw->max_docid_expr->max_docid= info->lastpos;
   return 0;
 }
Thread
bk commit into 5.1 tree (svoj:1.2544) BUG#29445Sergey Vojtovich12 Jul
  • Re: bk commit into 5.1 tree (svoj:1.2544) BUG#29445Sergei Golubchik12 Jul