From 782d86af44a314c8c60d6c017d500f4f214f665b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 5 Jul 2013 16:02:02 +0200 Subject: [PATCH] MDEV-4257 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' fails on FROM subquery with fulltext search, derived_merge=on remove emtpty Item_func_match::update_used_tables() method --- mysql-test/r/fulltext_derived_4257.result | 6 ++++++ mysql-test/t/fulltext_derived_4257.test | 6 ++++++ sql/item_func.h | 1 - 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 mysql-test/r/fulltext_derived_4257.result create mode 100644 mysql-test/t/fulltext_derived_4257.test diff --git a/mysql-test/r/fulltext_derived_4257.result b/mysql-test/r/fulltext_derived_4257.result new file mode 100644 index 00000000000..8479baef388 --- /dev/null +++ b/mysql-test/r/fulltext_derived_4257.result @@ -0,0 +1,6 @@ +set optimizer_switch = 'derived_merge=on'; +create table t1 (c1 char(8), c2 char(8)) engine=myisam; +insert into t1 values ('test1','test2'),('test3','test4'); +select * from (select c1 from t1 where match (c2) against ('hello' in boolean mode)) as alias; +c1 +drop table t1; diff --git a/mysql-test/t/fulltext_derived_4257.test b/mysql-test/t/fulltext_derived_4257.test new file mode 100644 index 00000000000..07626b8b557 --- /dev/null +++ b/mysql-test/t/fulltext_derived_4257.test @@ -0,0 +1,6 @@ +set optimizer_switch = 'derived_merge=on'; +create table t1 (c1 char(8), c2 char(8)) engine=myisam; +insert into t1 values ('test1','test2'),('test3','test4'); +select * from (select c1 from t1 where match (c2) against ('hello' in boolean mode)) as alias; +drop table t1; + diff --git a/sql/item_func.h b/sql/item_func.h index 6cd036920f8..c4b21b6287d 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1704,7 +1704,6 @@ public: bool is_expensive_processor(uchar *arg) { return TRUE; } enum Functype functype() const { return FT_FUNC; } const char *func_name() const { return "match"; } - void update_used_tables() {} table_map not_null_tables() const { return 0; } bool fix_fields(THD *thd, Item **ref); bool eq(const Item *, bool binary_cmp) const;