summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-06 15:14:46 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-06 15:14:46 +0200
commit6770a9a836fcc8aa9f49f6b91ce237851638916b (patch)
tree7bb7d4fd838813b1fd7054c6c32a79b5541561cf /mysql-test/t
parent385de8743added00cfaece08720e3a9a789760a5 (diff)
downloadmariadb-git-6770a9a836fcc8aa9f49f6b91ce237851638916b.tar.gz
MDEV-4316 MariaDB server crash with signal 11
fulltext search was initialized for all MATCH ... AGAINST items at the end of the JOIN::optimize(). But since 5.3 derived tables are initialized lazily on first use, very late in the sub_select(). Skip Item_func_match::init_search initialization if the corresponding table isn't open yet; repeat fulltext initialization for all not-yet-initialized MATCH ... AGAINST items after creating derived tables.
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/fulltext_derived_4316.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/fulltext_derived_4316.test b/mysql-test/t/fulltext_derived_4316.test
new file mode 100644
index 00000000000..ecf4a0e7722
--- /dev/null
+++ b/mysql-test/t/fulltext_derived_4316.test
@@ -0,0 +1,14 @@
+#
+# MATCH on the derived tables
+#
+
+#
+# MDEV-4316 MariaDB server crash with signal 11
+#
+
+create table t1 (ft text) engine=myisam;
+insert into t1 values ('test1'),('test2');
+select distinct match(ft) against("test1" in boolean mode) from
+ (select distinct ft from t1) as t;
+drop table t1;
+