diff options
author | unknown <evgen@moonbone.local> | 2005-08-31 18:26:50 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-08-31 18:26:50 +0400 |
commit | 490bfbc330ba412530fb4bc0f23cd6ab6cbe7f84 (patch) | |
tree | ecc36432e814cd8518b1898ad8522a52c18fa634 /mysql-test/t/func_gconcat.test | |
parent | b7f4a6909531d0d28f47f33e73f55078ef31ea24 (diff) | |
download | mariadb-git-490bfbc330ba412530fb4bc0f23cd6ab6cbe7f84.tar.gz |
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.
Diffstat (limited to 'mysql-test/t/func_gconcat.test')
-rw-r--r-- | mysql-test/t/func_gconcat.test | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 9793d0d0a2c..827a2813718 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -343,4 +343,9 @@ SELECT COUNT(*), GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |') DROP TABLE t1,t2; +# +# Bug #12861 hang with group_concat insubquery FROM DUAL +# +select * from (select group_concat('c') from DUAL) t; + # End of 4.1 tests |