Commit 95512129 authored by Michael Widenius's avatar Michael Widenius

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
parent 163f0dae
......@@ -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");
......
......@@ -2967,10 +2967,13 @@ int ha_federatedx::rnd_pos(uchar *buf, uchar *pos)
DBUG_ENTER("ha_federatedx::rnd_pos");
ha_statistic_increment(&SSV::ha_read_rnd_count);
/* We have to move this to 'ref' to get things aligned */
bmove(ref, pos, ref_length);
if ((retval= txn->acquire(share, TRUE, &io)))
goto error;
if ((retval= io->seek_position(&result, pos)))
if ((retval= io->seek_position(&result, ref)))
goto error;
retval= read_next(buf, result);
......
......@@ -423,8 +423,7 @@ my_off_t _ma_new(register MARIA_HA *info, int level,
share->key_del_current= mi_sizekorr(buff+share->keypage_header);
#ifndef DBUG_OFF
key_del_current= share->key_del_current;
DBUG_ASSERT(key_del_current != share->state.key_del &&
(key_del_current != 0) &&
DBUG_ASSERT((key_del_current != 0) &&
((key_del_current == HA_OFFSET_ERROR) ||
(key_del_current <=
(share->state.state.key_file_length - block_size))));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment