summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2013-03-14 11:22:08 +0300
committerSergey Glukhov <sergey.glukhov@oracle.com>2013-03-14 11:22:08 +0300
commit662feebc92d87a936d16f18ce017cfd3aadeb43a (patch)
tree7b2a6c0b18af198ce86106da7b876ada7c7ddd72 /sql/item_sum.cc
parent6947da5cf544c75579837245d10b7faa3ff4ceb6 (diff)
parent6077a41a66607e4b7da3fc5088d12ad1731c45c7 (diff)
downloadmariadb-git-662feebc92d87a936d16f18ce017cfd3aadeb43a.tar.gz
5.1 -> 5.5 merge
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 81d151ffba0..aa65826f4ce 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -3089,7 +3089,14 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
tmp= (ORDER *)(order + arg_count_order);
for (uint i= 0; i < arg_count_order; i++, tmp++)
{
- memcpy(tmp, item->order[i], sizeof(ORDER));
+ /*
+ Compiler generated copy constructor is used to
+ to copy all the members of ORDER struct.
+ It's also necessary to update ORDER::next pointer
+ so that it points to new ORDER element.
+ */
+ new (tmp) st_order(*(item->order[i]));
+ tmp->next= (i + 1 == arg_count_order) ? NULL : (tmp + 1);
order[i]= tmp;
}
}