summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <svoj@april.(none)>2006-02-07 15:30:32 +0400
committerunknown <svoj@april.(none)>2006-02-07 15:30:32 +0400
commit79f6936d738439d6e42da3ef89225fdaea318b54 (patch)
tree8402a8f523d327a012699cec8afb0c2562b02d51
parent96268d4a9a375fdd6e7effe530f26261bbd01d55 (diff)
parenta525b294704e7035ff6f8d3ef20f56fbbe251a98 (diff)
downloadmariadb-git-79f6936d738439d6e42da3ef89225fdaea318b54.tar.gz
Merge april.(none):/home/svoj/devel/mysql/merge/mysql-4.1
into april.(none):/home/svoj/devel/mysql/merge/mysql-5.0 mysql-test/r/fulltext.result: Manual merge. mysql-test/t/fulltext.test: Manual merge. sql/item_func.h: Manual merge. sql/sql_base.cc: Manual merge: use local.
-rw-r--r--mysql-test/r/fulltext.result11
-rw-r--r--mysql-test/t/fulltext.test12
-rw-r--r--sql/item_func.h4
3 files changed, 24 insertions, 3 deletions
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index 3e6dd896ed8..d683fcfa3ff 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -445,3 +445,14 @@ t1 CREATE TABLE `t1` (
FULLTEXT KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
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;
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index a90344784cd..91033fe2ba9 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -365,4 +365,16 @@ CREATE TABLE t1 (a VARCHAR(10000), FULLTEXT(a));
SHOW CREATE TABLE t1;
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
diff --git a/sql/item_func.h b/sql/item_func.h
index d81eb5f6ebf..d8fa45fb9c0 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -1283,10 +1283,8 @@ public:
DBUG_ENTER("Item_func_match");
Item_real_func::cleanup();
if (!master && ft_handler)
- {
ft_handler->please->close_search(ft_handler);
- ft_handler=0;
- }
+ ft_handler= 0;
concat= 0;
DBUG_VOID_RETURN;
}