diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2015-07-30 18:51:44 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-07-31 13:05:10 +0400 |
commit | 1ad294e06430d9fa2dd7e4dd84ffd7909aff0ca5 (patch) | |
tree | 290968af678809c0b1702efa731ea78ae44654cb /mysql-test/t/func_gconcat.test | |
parent | fa765a45250176d1168ce5a61dee484c997604b6 (diff) | |
download | mariadb-git-1ad294e06430d9fa2dd7e4dd84ffd7909aff0ca5.tar.gz |
MDEV-7821 - Server crashes in Item_func_group_concat::fix_fields on 2nd
execution of PS
GROUP_CONCAT() with ORDER BY column position may crash server on PS reexecution.
The problem was that arguments array of GROUP_CONCAT() was adjusted to point to
temporary elements (resolved ORDER BY fields) during first execution.
This patch expands rev. 08763096cb to restore original arguments array as well.
Diffstat (limited to 'mysql-test/t/func_gconcat.test')
-rw-r--r-- | mysql-test/t/func_gconcat.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 42a30760a86..5550eebf1a3 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -821,3 +821,14 @@ FROM ( SELECT * FROM t2 ) AS sq2, t3 ORDER BY field; drop table t3, t2, t1; + +--echo # +--echo # MDEV-7821 - Server crashes in Item_func_group_concat::fix_fields on 2nd +--echo # execution of PS +--echo # +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(1),(2); +PREPARE stmt FROM "SELECT GROUP_CONCAT(t1a.a ORDER BY 1, t1a.a=0) FROM t1 AS t1a, t1 AS t1b GROUP BY t1a.a"; +EXECUTE stmt; +EXECUTE stmt; +DROP TABLE t1; |