summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect.test
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-06-25 16:32:47 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-06-25 16:32:47 +0300
commit5e0aaa2613bb5394395cb06d7e56a29cd7e952f3 (patch)
tree45ae72f4a1e319c48f0c80ac2781c4246338f0c1 /mysql-test/t/subselect.test
parent8241532516c9018882f2cde1b8e70ba1b544bc68 (diff)
parent2b2e09086cf2b2fcbe32b2555ef51d52481487da (diff)
downloadmariadb-git-5e0aaa2613bb5394395cb06d7e56a29cd7e952f3.tar.gz
merge
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r--mysql-test/t/subselect.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 06aaf5dfb7f..2e442e7f897 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -3921,3 +3921,28 @@ GROUP BY
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
+
+
+--echo #
+--echo # Bug #52711: Segfault when doing EXPLAIN SELECT with
+--echo # union...order by (select... where...)
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a));
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (1),(2);
+
+--echo # Should not crash
+--disable_result_log
+EXPLAIN
+SELECT * FROM t2 UNION SELECT * FROM t2
+ ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
+
+--echo # Should not crash
+SELECT * FROM t2 UNION SELECT * FROM t2
+ ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
+DROP TABLE t1,t2;
+--enable_result_log
+
+--echo End of 5.1 tests