summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_gconcat.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/func_gconcat.test')
-rw-r--r--mysql-test/t/func_gconcat.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 71d3d5a140b..0b4f0be114c 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -693,6 +693,21 @@ SELECT 1 FROM t1 WHERE t1.a NOT IN
DROP TABLE t1, t2;
+#
+# Bug #49487: crash with explain extended and group_concat in a derived table
+#
+
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (),();
+
+EXPLAIN EXTENDED SELECT 1 FROM
+ (SELECT DISTINCT GROUP_CONCAT(td.f1) FROM t1,t1 AS td GROUP BY td.f1) AS d,t1;
+
+SELECT 1 FROM
+ (SELECT DISTINCT GROUP_CONCAT(td.f1) FROM t1,t1 AS td GROUP BY td.f1) AS d,t1;
+
+DROP TABLE t1;
+
--echo End of 5.0 tests
#