summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_gconcat.test
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2008-02-28 13:31:19 +0200
committerunknown <gkodinov/kgeorge@magare.gmz>2008-02-28 13:31:19 +0200
commitf28612eae272fb56f9bb07bddf31852882af7ed8 (patch)
tree3a08d6d15a1418bf0adfa48f246ca27e23b2dce0 /mysql-test/t/func_gconcat.test
parent87007702fe6348de943a825e81f8d8f4bbb1af5a (diff)
downloadmariadb-git-f28612eae272fb56f9bb07bddf31852882af7ed8.tar.gz
Bug #34747: crash in debug assertion check after derived table
Was a double-free of the Unique member of Item_func_group_concat. This was not causing a crash because the Unique is a descendent of Sql_alloc. Fixed to free the Unique only if it was allocated for the instance of Item_func_group_concat it was referenced from mysql-test/r/func_gconcat.result: Bug #34747: test case mysql-test/t/func_gconcat.test: Bug #34747: test case sql/item_sum.cc: Bug #34747: free the Unique only if it was allocated for this instance of Item_func_group_concat
Diffstat (limited to 'mysql-test/t/func_gconcat.test')
-rw-r--r--mysql-test/t/func_gconcat.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 84c286e516b..87632fbdbb8 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -640,4 +640,21 @@ SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1;
DROP TABLE t1, t2, t3;
+#
+# Bug #34747: crash in debug assertion check after derived table
+#
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (),();
+SELECT s1.d1 FROM
+(
+ SELECT
+ t1.a as d1,
+ GROUP_CONCAT(DISTINCT t1.a) AS d2
+ FROM
+ t1 AS t1,
+ t1 AS t2
+ GROUP BY 1
+) AS s1;
+DROP TABLE t1;
+
--echo End of 5.0 tests