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
This commit is contained in:
parent
401c69e49b
commit
ee5551e644
@ -3064,10 +3064,10 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
|
|||||||
object being copied.
|
object being copied.
|
||||||
*/
|
*/
|
||||||
ORDER *tmp;
|
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)))
|
sizeof(ORDER) * arg_count_order)))
|
||||||
return;
|
return;
|
||||||
tmp= (ORDER *)(order + arg_count_order);
|
order= (ORDER **)(tmp + arg_count_order);
|
||||||
for (uint i= 0; i < arg_count_order; i++, tmp++)
|
for (uint i= 0; i < arg_count_order; i++, tmp++)
|
||||||
{
|
{
|
||||||
memcpy(tmp, item->order[i], sizeof(ORDER));
|
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()
|
void Item_func_group_concat::cleanup()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("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");
|
DBUG_ENTER("ha_federatedx::rnd_pos");
|
||||||
ha_statistic_increment(&SSV::ha_read_rnd_count);
|
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)))
|
if ((retval= txn->acquire(share, TRUE, &io)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if ((retval= io->seek_position(&result, pos)))
|
if ((retval= io->seek_position(&result, ref)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
retval= read_next(buf, result);
|
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);
|
share->key_del_current= mi_sizekorr(buff+share->keypage_header);
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
key_del_current= share->key_del_current;
|
key_del_current= share->key_del_current;
|
||||||
DBUG_ASSERT(key_del_current != share->state.key_del &&
|
DBUG_ASSERT((key_del_current != 0) &&
|
||||||
(key_del_current != 0) &&
|
|
||||||
((key_del_current == HA_OFFSET_ERROR) ||
|
((key_del_current == HA_OFFSET_ERROR) ||
|
||||||
(key_del_current <=
|
(key_del_current <=
|
||||||
(share->state.state.key_file_length - block_size))));
|
(share->state.state.key_file_length - block_size))));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user