Commit 1ff64d6e authored by unknown's avatar unknown

Merge mysql.com:/home/svoj/devel/mysql/BUG25951/mysql-5.0-engines

into  mysql.com:/home/svoj/devel/mysql/BUG25951/mysql-5.1-engines


mysql-test/r/fulltext.result:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
sql/item_func.cc:
  Auto merged
parents 1a90e29f b8250c71
...@@ -469,3 +469,10 @@ a FORMAT(MATCH(a) AGAINST('test1 test'),6) ...@@ -469,3 +469,10 @@ a FORMAT(MATCH(a) AGAINST('test1 test'),6)
test1 0.685267 test1 0.685267
DEALLOCATE PREPARE stmt; DEALLOCATE PREPARE stmt;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(255), FULLTEXT(a));
SELECT * FROM t1 IGNORE INDEX(a) WHERE MATCH(a) AGAINST('test');
a
ALTER TABLE t1 DISABLE KEYS;
SELECT * FROM t1 WHERE MATCH(a) AGAINST('test');
ERROR HY000: Can't find FULLTEXT index matching the column list
DROP TABLE t1;
...@@ -389,4 +389,14 @@ EXECUTE stmt; ...@@ -389,4 +389,14 @@ EXECUTE stmt;
DEALLOCATE PREPARE stmt; DEALLOCATE PREPARE stmt;
DROP TABLE t1; DROP TABLE t1;
#
# BUG#25951 - ignore/use index does not work with fulltext
#
CREATE TABLE t1 (a VARCHAR(255), FULLTEXT(a));
SELECT * FROM t1 IGNORE INDEX(a) WHERE MATCH(a) AGAINST('test');
ALTER TABLE t1 DISABLE KEYS;
--error 1191
SELECT * FROM t1 WHERE MATCH(a) AGAINST('test');
DROP TABLE t1;
# End of 4.1 tests # End of 4.1 tests
...@@ -4725,7 +4725,7 @@ bool Item_func_match::fix_index() ...@@ -4725,7 +4725,7 @@ bool Item_func_match::fix_index()
for (keynr=0 ; keynr < table->s->keys ; keynr++) for (keynr=0 ; keynr < table->s->keys ; keynr++)
{ {
if ((table->key_info[keynr].flags & HA_FULLTEXT) && if ((table->key_info[keynr].flags & HA_FULLTEXT) &&
(table->keys_in_use_for_query.is_set(keynr))) (table->s->keys_in_use.is_set(keynr)))
{ {
ft_to_key[fts]=keynr; ft_to_key[fts]=keynr;
ft_cnt[fts]=0; ft_cnt[fts]=0;
......
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