[Commits] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2897)

Michael Widenius monty at askmonty.org
Fri Sep 3 13:01:54 EEST 2010


#At lp:maria based on revid:monty at askmonty.org-20100830132523-n531bftk0q1dpby6

 2897 Michael Widenius	2010-09-03
      Fixed bugs (mostly on sparc) that caused crashes in mysql-test-run
      modified:
        sql/item_sum.cc
        storage/federatedx/ha_federatedx.cc
        storage/maria/ma_page.c

per-file messages:
  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
=== modified file 'sql/item_sum.cc'
--- a/sql/item_sum.cc	2010-08-27 14:12:44 +0000
+++ b/sql/item_sum.cc	2010-09-03 10:01:47 +0000
@@ -3064,10 +3064,10 @@ Item_func_group_concat::Item_func_group_
     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_
 }
 
 
-
 void Item_func_group_concat::cleanup()
 {
   DBUG_ENTER("Item_func_group_concat::cleanup");

=== modified file 'storage/federatedx/ha_federatedx.cc'
--- a/storage/federatedx/ha_federatedx.cc	2010-08-20 07:29:26 +0000
+++ b/storage/federatedx/ha_federatedx.cc	2010-09-03 10:01:47 +0000
@@ -2967,10 +2967,13 @@ int ha_federatedx::rnd_pos(uchar *buf, u
   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);

=== modified file 'storage/maria/ma_page.c'
--- a/storage/maria/ma_page.c	2010-03-09 19:22:24 +0000
+++ b/storage/maria/ma_page.c	2010-09-03 10:01:47 +0000
@@ -423,8 +423,7 @@ my_off_t _ma_new(register MARIA_HA *info
       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))));



More information about the commits mailing list