Commit eeb04a33 authored by Michael Widenius's avatar Michael Widenius

Autmatic merge with 5.1

parents b5ef802f 8b63d346
...@@ -907,7 +907,7 @@ void _ma_print_bitmap(MARIA_FILE_BITMAP *bitmap, uchar *data, ...@@ -907,7 +907,7 @@ void _ma_print_bitmap(MARIA_FILE_BITMAP *bitmap, uchar *data,
fprintf(DBUG_FILE,"\nDump of bitmap page at %s\n", llstr(page, llbuff)); fprintf(DBUG_FILE,"\nDump of bitmap page at %s\n", llstr(page, llbuff));
page++; /* Skip bitmap page */ page++; /* Skip bitmap page */
for (pos= data, end= pos + bitmap->total_size; for (pos= data, end= pos + bitmap->max_total_size;
pos < end ; pos < end ;
pos+= 6) pos+= 6)
{ {
......
...@@ -1983,14 +1983,22 @@ static int check_block_record(HA_CHECK *param, MARIA_HA *info, int extend, ...@@ -1983,14 +1983,22 @@ static int check_block_record(HA_CHECK *param, MARIA_HA *info, int extend,
{ {
/* Not at end of bitmap */ /* Not at end of bitmap */
uint bitmap_pattern; uint bitmap_pattern;
uint byte_offset;
offset_page= (uint) ((page % share->bitmap.pages_covered) -1) * 3; offset_page= (uint) ((page % share->bitmap.pages_covered) -1) * 3;
offset= offset_page & 7; offset= offset_page & 7;
data= bitmap_buff + offset_page / 8; byte_offset= offset_page / 8;
data= bitmap_buff + byte_offset;
bitmap_pattern= uint2korr(data); 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)) || if (((bitmap_pattern >> offset)) ||
(data + 2 < bitmap_buff + share->bitmap.max_total_size && (byte_offset + 2 < share->bitmap.max_total_size &&
_ma_check_if_zero(data+2, bitmap_buff + share->bitmap.max_total_size - _ma_check_if_zero(data+2, share->bitmap.max_total_size -
data - 2))) byte_offset - 2)))
{ {
ulonglong bitmap_page; ulonglong bitmap_page;
bitmap_page= page / share->bitmap.pages_covered; bitmap_page= page / share->bitmap.pages_covered;
......
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