Commit 79f6936d authored by unknown's avatar unknown

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.
parents 96268d4a a525b294
...@@ -445,3 +445,14 @@ t1 CREATE TABLE `t1` ( ...@@ -445,3 +445,14 @@ t1 CREATE TABLE `t1` (
FULLTEXT KEY `a` (`a`) FULLTEXT KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1; 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;
...@@ -365,4 +365,16 @@ CREATE TABLE t1 (a VARCHAR(10000), FULLTEXT(a)); ...@@ -365,4 +365,16 @@ CREATE TABLE t1 (a VARCHAR(10000), FULLTEXT(a));
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
DROP 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 # End of 4.1 tests
...@@ -1283,10 +1283,8 @@ class Item_func_match :public Item_real_func ...@@ -1283,10 +1283,8 @@ class Item_func_match :public Item_real_func
DBUG_ENTER("Item_func_match"); DBUG_ENTER("Item_func_match");
Item_real_func::cleanup(); Item_real_func::cleanup();
if (!master && ft_handler) if (!master && ft_handler)
{
ft_handler->please->close_search(ft_handler); ft_handler->please->close_search(ft_handler);
ft_handler=0; ft_handler= 0;
}
concat= 0; concat= 0;
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment