summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-09-03 13:01:47 +0300
committerMichael Widenius <monty@askmonty.org>2010-09-03 13:01:47 +0300
commitee5551e644cfae6bc1c95df0ff98d70a666dfdd2 (patch)
tree7f634150797290a2852da8082346a363c13b0ed0 /sql/item_sum.cc
parent401c69e49babc293da30f833c18673f5f071eca3 (diff)
downloadmariadb-git-ee5551e644cfae6bc1c95df0ff98d70a666dfdd2.tar.gz
Fixed bugs (mostly on sparc) that caused crashes in mysql-test-run
sql/item_sum.cc: Fixed alignment problem that caused crases on sparc. (ORDER needs an aligment of 8 as it includes longlongs) storage/federatedx/ha_federatedx.cc: Fixed crash on sparc as 'pos' is not aligned on 4/8. storage/maria/ma_page.c: Removed wrong assert
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 934003ead19..45c3ee3cd20 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -3064,10 +3064,10 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
object being copied.
*/
ORDER *tmp;
- if (!(order= (ORDER **) thd->alloc(sizeof(ORDER *) * arg_count_order +
+ if (!(tmp= (ORDER *) thd->alloc(sizeof(ORDER *) * arg_count_order +
sizeof(ORDER) * arg_count_order)))
return;
- tmp= (ORDER *)(order + arg_count_order);
+ order= (ORDER **)(tmp + arg_count_order);
for (uint i= 0; i < arg_count_order; i++, tmp++)
{
memcpy(tmp, item->order[i], sizeof(ORDER));
@@ -3076,7 +3076,6 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
}
-
void Item_func_group_concat::cleanup()
{
DBUG_ENTER("Item_func_group_concat::cleanup");