summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_gconcat.test
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2010-10-29 11:44:32 +0400
committerSergey Glukhov <sergey.glukhov@oracle.com>2010-10-29 11:44:32 +0400
commitc04bf683fe2582753e8d575e508902245efdd47c (patch)
tree829d4c492530cd2178ce721d122dc2c85359d1ba /mysql-test/t/func_gconcat.test
parentc7371c9e757e72cdeef3991b28f0980030d52ca5 (diff)
downloadmariadb-git-c04bf683fe2582753e8d575e508902245efdd47c.tar.gz
Bug#57194 group_concat cause crash and/or invalid memory reads with type errors
The problem is caused by bug49487 fix and became visible after after bug56679 fix. Items are cleaned up and set to unfixed state after filling derived table. So we can not rely on item::fixed state in Item_func_group_concat::print and we can not use 'args' array as items there may be cleaned up. The fix is always to use orig_args array of items as it always should contain the correct data. mysql-test/r/func_gconcat.result: test case mysql-test/t/func_gconcat.test: test case sql/item_sum.cc: The fix is always to use orig_args array of items.
Diffstat (limited to 'mysql-test/t/func_gconcat.test')
-rw-r--r--mysql-test/t/func_gconcat.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 926c1f92855..29fc8a9dc3c 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -734,4 +734,14 @@ EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
+--echo #
+--echo # Bug#57194 group_concat cause crash and/or invalid memory reads with type errors
+--echo #
+
+CREATE TABLE t1(f1 int);
+INSERT INTO t1 values (0),(0);
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d));
+DROP TABLE t1;
+
--echo End of 5.1 tests