summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com>2005-05-07 21:39:29 +0500
committerunknown <svoj@mysql.com>2005-05-07 21:39:29 +0500
commitd868738e11f6884cf8c2e8397b8831ef20c68b13 (patch)
tree42b69dca7b4d06e25d717879abd76f882b73cfb6
parente584559febc18f045b74e1e13e58c88eba92c76a (diff)
parentf5f132fdde32f1798612c8d5b17a1fecf5f1c0fa (diff)
downloadmariadb-git-d868738e11f6884cf8c2e8397b8831ef20c68b13.tar.gz
Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/svoj/devel/mysql/7709-mysql-4.0 BitKeeper/etc/logging_ok: auto-union
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--mysql-test/r/innodb.result4
-rw-r--r--mysql-test/t/innodb.test10
-rw-r--r--sql/item_func.cc5
4 files changed, 20 insertions, 0 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 967f8c7cb47..c86a27be22e 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -143,6 +143,7 @@ serg@sergbook.mylan
serg@sergbook.mysql.com
sergefp@mysql.com
sinisa@rhols221.adsl.netsonic.fi
+svoj@mysql.com
tfr@beta.frontier86.ee
tfr@indrek.tfr.cafe.ee
tfr@sarvik.tfr.cafe.ee
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index f00679801f8..f634edcbe91 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -1272,3 +1272,7 @@ Cannot delete or update a parent row: a foreign key constraint fails
delete from t1 where id=15;
delete from t1 where id=0;
drop table t1;
+CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
+SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
+The used table type doesn't support FULLTEXT indexes
+DROP TABLE t1;
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 2c8002ea841..96975d54810 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -911,3 +911,13 @@ delete from t1 where id=15;
delete from t1 where id=0;
drop table t1;
+
+#
+# BUG#7709 test case - Boolean fulltext query against unsupported
+# engines does not fail
+#
+
+CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
+--error 1214;
+SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
+DROP TABLE t1;
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 334be48dc9a..855e86b2382 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2257,6 +2257,11 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist)
key=NO_SUCH_KEY;
const_item_cache=0;
table=((Item_field *)fields.head())->field->table;
+ if (!(table->file->table_flags() & HA_CAN_FULLTEXT))
+ {
+ my_error(ER_TABLE_CANT_HANDLE_FULLTEXT, MYF(0));
+ return 1;
+ }
table->fulltext_searched=1;
record=table->record[0];
if (key == NO_SUCH_KEY && mode != FT_BOOL)