mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix bug #12861 client hang with group_concat insubquery FROM DUAL.
Item_func_group_concat::fix_fields() set maybe_null flag to 0, and set it to 1 only if some of it's arguments may be null. When used in subquery in tmp table created field which can't be null. When no data retireved result field have to be set to null and error mentioned in bug report occurs. Also this bug can occur if selecting from not null field in empty table. Function group_concat now marked maybe_null from the very beginning not only if some of it's argument may be null. sql/item_sum.cc: Fix bug #12861 client hang with group_concat insubquery FROM DUAL. mysql-test/r/func_gconcat.result: Test case for bug #12861 client hang with group_concat insubquery FROM DUAL. mysql-test/t/func_gconcat.test: Test case for bug #12861 client hang with group_concat insubquery FROM DUAL.
This commit is contained in:
@ -548,3 +548,6 @@ FROM t1 JOIN t2 ON t1.bID = t2.bID;
|
||||
COUNT(*) GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
|
||||
2 test
|
||||
DROP TABLE t1,t2;
|
||||
select * from (select group_concat('c') from DUAL) t;
|
||||
group_concat('c')
|
||||
NULL
|
||||
|
Reference in New Issue
Block a user