[Commits] Rev 3011: Autmatic merge with 5.1 in lp:maria/5.2

Michael Widenius monty at askmonty.org
Fri Aug 12 15:51:13 EEST 2011


At lp:maria/5.2

------------------------------------------------------------
revno: 3011 [merge]
revision-id: monty at askmonty.org-20110812125105-f4p71sflif3bc934
parent: monty at askmonty.org-20110810194439-q07ccs4xx8um9enl
parent: monty at askmonty.org-20110812124056-hmm2u9a4hta0hbuz
committer: Michael Widenius <monty at askmonty.org>
branch nick: maria-5.2
timestamp: Fri 2011-08-12 15:51:05 +0300
message:
  Autmatic merge with 5.1
modified:
  storage/maria/ma_bitmap.c      sp1f-ma_bitmap.c-20070118193810-dcdqg6iu32wkt3pqyio4lqdqmaff2m7g
  storage/maria/ma_check.c       sp1f-ma_check.c-20060411134408-m5d5jao4sr32xsjjkig2uhdndqm5cgba
-------------- next part --------------
=== modified file 'storage/maria/ma_bitmap.c'
--- a/storage/maria/ma_bitmap.c	2011-07-26 04:52:15 +0000
+++ b/storage/maria/ma_bitmap.c	2011-08-12 12:51:05 +0000
@@ -907,7 +907,7 @@ void _ma_print_bitmap(MARIA_FILE_BITMAP
   fprintf(DBUG_FILE,"\nDump of bitmap page at %s\n", llstr(page, llbuff));
 
   page++;                                       /* Skip bitmap page */
-  for (pos= data, end= pos + bitmap->total_size;
+  for (pos= data, end= pos + bitmap->max_total_size;
        pos < end ;
        pos+= 6)
   {

=== modified file 'storage/maria/ma_check.c'
--- a/storage/maria/ma_check.c	2011-07-26 04:52:15 +0000
+++ b/storage/maria/ma_check.c	2011-08-12 12:51:05 +0000
@@ -1983,14 +1983,22 @@ static int check_block_record(HA_CHECK *
   {
     /* Not at end of bitmap */
     uint bitmap_pattern;
+    uint byte_offset;
+
     offset_page= (uint) ((page % share->bitmap.pages_covered) -1) * 3;
     offset= offset_page & 7;
-    data= bitmap_buff + offset_page / 8;
+    byte_offset= offset_page / 8;
+    data= bitmap_buff + byte_offset;
     bitmap_pattern= uint2korr(data);
+    if (byte_offset + 1 == share->bitmap.max_total_size)
+    {
+      /* On last byte of bitmap; Remove possible checksum */
+      bitmap_pattern&= 0xff;
+    }
     if (((bitmap_pattern >> offset)) ||
-        (data + 2 < bitmap_buff + share->bitmap.max_total_size &&
-         _ma_check_if_zero(data+2, bitmap_buff + share->bitmap.max_total_size -
-                           data - 2)))
+        (byte_offset + 2 < share->bitmap.max_total_size &&
+         _ma_check_if_zero(data+2, share->bitmap.max_total_size -
+                           byte_offset - 2)))
     {
       ulonglong bitmap_page;
       bitmap_page= page / share->bitmap.pages_covered;



More information about the commits mailing list