From e3c3086304c6574a7b9d32e4acd339269a4f1749 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Feb 2006 20:40:12 +0400 Subject: 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. mysql-test/r/fulltext.result: Testcase for BUG#14496. mysql-test/t/fulltext.test: Testcase for BUG#14496. sql/item_func.h: In Item_func_match::cleanup() always reset ft_handler to 0. --- mysql-test/t/fulltext.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/t/fulltext.test') diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 1399b9bfdff..d5ce6241490 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -357,4 +357,16 @@ SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE); 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 -- cgit v1.2.1