From: Date: February 1 2006 5:40pm Subject: bk commit into 4.1 tree (svoj:1.2470) BUG#14496 List-Archive: http://lists.mysql.com/commits/2015 X-Bug: 14496 Message-Id: <20060201164017.DB7A0BA6@april.pils.ru> Below is the list of changes that have just been committed into a local 4.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 1.2470 06/02/01 20:40:12 svoj@april.(none) +3 -0 BUG#14496: Crash or strange results with prepared statement, MATCH and FULLTEXT Fixed that fulltext query using PS results in unexpected behaviour when executed 2 or more times. sql/item_func.h 1.128 06/02/01 20:40:10 svoj@april.(none) +1 -1 In Item_func_match::cleanup() always reset ft_handler to 0. mysql-test/t/fulltext.test 1.77 06/02/01 20:40:10 svoj@april.(none) +12 -0 Testcase for BUG#14496. mysql-test/r/fulltext.result 1.78 06/02/01 20:40:10 svoj@april.(none) +11 -0 Testcase for BUG#14496. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: svoj # Host: april.(none) # Root: /home/svoj/devel/mysql/BUG14496/mysql-4.1 --- 1.127/sql/item_func.h 2005-11-10 18:12:18 +04:00 +++ 1.128/sql/item_func.h 2006-02-01 20:40:10 +04:00 @@ -1056,7 +1056,6 @@ if (!master && ft_handler) { ft_handler->please->close_search(ft_handler); - ft_handler=0; if (join_key) table->file->ft_handler=0; table->fulltext_searched=0; @@ -1066,6 +1065,7 @@ delete concat; concat= 0; } + ft_handler= 0; DBUG_VOID_RETURN; } enum Functype functype() const { return FT_FUNC; } --- 1.77/mysql-test/r/fulltext.result 2005-11-26 22:35:59 +04:00 +++ 1.78/mysql-test/r/fulltext.result 2006-02-01 20:40:10 +04:00 @@ -436,3 +436,14 @@ a testword'' DROP TABLE t1; +CREATE TABLE t1 (a TEXT, FULLTEXT KEY(a)); +INSERT INTO t1 VALUES('test'),('test1'),('test'); +PREPARE stmt from "SELECT a, MATCH(a) AGAINST('test1 test') FROM t1 WHERE MATCH(a) AGAINST('test1 test')"; +EXECUTE stmt; +a MATCH(a) AGAINST('test1 test') +test1 0.68526661396027 +EXECUTE stmt; +a MATCH(a) AGAINST('test1 test') +test1 0.68526661396027 +DEALLOCATE PREPARE stmt; +DROP TABLE t1; --- 1.76/mysql-test/t/fulltext.test 2005-11-26 22:35:59 +04:00 +++ 1.77/mysql-test/t/fulltext.test 2006-02-01 20:40:10 +04:00 @@ -357,4 +357,16 @@ SELECT a FROM t1 WHERE MATCH a AGAINST('testword\'\'' IN BOOLEAN MODE); DROP TABLE t1; +# +# BUG#14496: Crash or strange results with prepared statement, +# MATCH and FULLTEXT +# +CREATE TABLE t1 (a TEXT, FULLTEXT KEY(a)); +INSERT INTO t1 VALUES('test'),('test1'),('test'); +PREPARE stmt from "SELECT a, MATCH(a) AGAINST('test1 test') FROM t1 WHERE MATCH(a) AGAINST('test1 test')"; +EXECUTE stmt; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +DROP TABLE t1; + # End of 4.1 tests