summaryrefslogtreecommitdiff
path: root/storage
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 /storage
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 'storage')
-rw-r--r--storage/federatedx/ha_federatedx.cc5
-rw-r--r--storage/maria/ma_page.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc
index b5215b17f62..c3105de7a94 100644
--- a/storage/federatedx/ha_federatedx.cc
+++ b/storage/federatedx/ha_federatedx.cc
@@ -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);
diff --git a/storage/maria/ma_page.c b/storage/maria/ma_page.c
index acbee2a6f07..80a9c4f486f 100644
--- a/storage/maria/ma_page.c
+++ b/storage/maria/ma_page.c
@@ -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))));