mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -1103,3 +1103,19 @@ ORDER BY field;
|
||||
field
|
||||
c,c
|
||||
drop table t3, t2, t1;
|
||||
#
|
||||
# MDEV-7821 - Server crashes in Item_func_group_concat::fix_fields on 2nd
|
||||
# execution of PS
|
||||
#
|
||||
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;
|
||||
GROUP_CONCAT(t1a.a ORDER BY 1, t1a.a=0)
|
||||
1,1
|
||||
2,2
|
||||
EXECUTE stmt;
|
||||
GROUP_CONCAT(t1a.a ORDER BY 1, t1a.a=0)
|
||||
1,1
|
||||
2,2
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user