summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-07-10 17:04:58 +0300
committerGeorgi Kodinov <joro@sun.com>2009-07-10 17:04:58 +0300
commite5ecb481250f0599f4f79f28753cf0aebd0db853 (patch)
treece136fa32d0300c879e799daeb87834fe7c0fdfa /sql/item_sum.cc
parent7c5105599a68a739598767ac6a5546108e0522c0 (diff)
parent5beae1f8dcf6417315aec0940fadd8b32c218afe (diff)
downloadmariadb-git-e5ecb481250f0599f4f79f28753cf0aebd0db853.tar.gz
automerge
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 46a58351872..38251294053 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -3327,8 +3327,13 @@ bool Item_func_group_concat::add()
TREE_ELEMENT *el= 0; // Only for safety
if (row_eligible && tree)
+ {
el= tree_insert(tree, table->record[0] + table->s->null_bytes, 0,
tree->custom_arg);
+ /* check if there was enough memory to insert the row */
+ if (!el)
+ return 1;
+ }
/*
If the row is not a duplicate (el->count == 1)
we can dump the row here in case of GROUP_CONCAT(DISTINCT...)