summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorJoerg Bruehe <joerg@mysql.com>2009-07-16 09:13:19 +0200
committerJoerg Bruehe <joerg@mysql.com>2009-07-16 09:13:19 +0200
commitc4381e98108acb55841fca6d6863d1cad3e6ae0d (patch)
tree1ca4e7453129b5d419eca1167a4e0db6ed6466c0 /sql/item_sum.cc
parenta90146bfb4f73c39276cf4c74decbbffb11e728f (diff)
parent013e729e3d975a922b70326130d7043399e1186e (diff)
downloadmariadb-git-c4381e98108acb55841fca6d6863d1cad3e6ae0d.tar.gz
Merge main 5.1 into 5.1-build.
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...)