summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-06-14 14:22:14 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-06-14 14:22:14 +0200
commit1135244a647e423f6a7b2122ad9c305253039399 (patch)
treead4c47ed06553b45316105607ac1af603326d7be
parent2e73561c6c575a20003ca22733194d7ac12ff1ee (diff)
parentb40c2d2c512ee947625f85e893089b4cac1da970 (diff)
downloadmariadb-git-1135244a647e423f6a7b2122ad9c305253039399.tar.gz
Merge branch '10.2-release' into 10.3-release
-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 9b04f49878c..cb7b9264b3b 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -3887,11 +3887,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;