summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-06-14 22:10:50 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-06-14 22:10:50 +0200
commitf66d1850ac30922eaa49c0131d89efc8357155ff (patch)
treecb69c43694146bb7993078e76e203ded4ca48a5e /sql/item_sum.cc
parent772c5f3c78fcdaea2169ba435bac8d851c7945c7 (diff)
parent1135244a647e423f6a7b2122ad9c305253039399 (diff)
downloadmariadb-git-f66d1850ac30922eaa49c0131d89efc8357155ff.tar.gz
Merge branch '10.3' into 10.4
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index e03778be2a3..4051ae461ee 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -3848,11 +3848,15 @@ int copy_to_tree(void* key, element_count count __attribute__((unused)),
bool Item_func_group_concat::repack_tree(THD *thd)
{
struct st_repack_tree st;
+ int size= tree->size_of_element;
+ if (!tree->offset_to_key)
+ size-= sizeof(void*);
init_tree(&st.tree, (size_t) MY_MIN(thd->variables.max_heap_table_size,
thd->variables.sortbuff_size/16), 0,
- tree->size_of_element, group_concat_key_cmp_with_order, NULL,
+ size, group_concat_key_cmp_with_order, NULL,
(void*) this, MYF(MY_THREAD_SPECIFIC));
+ DBUG_ASSERT(tree->size_of_element == st.tree.size_of_element);
st.table= table;
st.len= 0;
st.maxlen= (size_t)thd->variables.group_concat_max_len;