Bug #37288 | Maria - zerofill corrupts table | ||
---|---|---|---|
Submitted: | 9 Jun 2008 16:31 | Modified: | 30 Jun 2008 10:02 |
Reporter: | Guilhem Bichot | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Maria storage engine | Severity: | S3 (Non-critical) |
Version: | 5.1-maria | OS: | Any |
Assigned to: | Guilhem Bichot | CPU Architecture: | Any |
[9 Jun 2008 16:31]
Guilhem Bichot
[9 Jun 2008 19:03]
Guilhem Bichot
tables for BUG#37288, just zerofill and check them
Attachment: bug37288.tar.bz2 (application/x-bzip2, text), 27.16 KiB.
[9 Jun 2008 20:43]
Guilhem Bichot
storage/maria/ma_check.c When zerofilling the data file, _ma_compact_block_page() may increase free space in a page so bitmap page needs to be corrected === modified file 'storage/maria/ma_check.c' --- a/storage/maria/ma_check.c 2008-05-29 18:39:25 +0000 +++ b/storage/maria/ma_check.c 2008-06-09 20:31:04 +0000 @@ -3240,11 +3240,16 @@ static my_bool maria_zerofill_data(HA_CH bzero(buff, LSN_SIZE); if (max_entry != 0) { + my_bool is_head_page= (page_type == HEAD_PAGE); dir= dir_entry_pos(buff, block_size, max_entry - 1); _ma_compact_block_page(buff, block_size, max_entry -1, 0, - page_type == HEAD_PAGE ? ~(TrID) 0 : 0, - page_type == HEAD_PAGE ? + is_head_page ? ~(TrID) 0 : 0, + is_head_page ? share->base.min_block_length : 0); + /* compactation may have increased free space */ + if (_ma_bitmap_set(info, page, is_head_page, + uint2korr(buff + EMPTY_SPACE_OFFSET))) + goto err; /* Zerofille the not used part */ offset= uint2korr(dir) + uint2korr(dir+2); @@ -3266,10 +3271,9 @@ static my_bool maria_zerofill_data(HA_CH PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 1); } - if (flush_pagecache_blocks(share->pagecache, &info->dfile, - FLUSH_FORCE_WRITE)) - DBUG_RETURN(1); - DBUG_RETURN(0); + DBUG_RETURN(_ma_bitmap_flush(share) || + flush_pagecache_blocks(share->pagecache, &info->dfile, + FLUSH_FORCE_WRITE)); err: pagecache_unlock_by_link(share->pagecache, page_link.link,
[10 Jun 2008 20:27]
Guilhem Bichot
Newer patch at http://lists.mysql.com/maria/63
[30 Jun 2008 10:02]
Guilhem Bichot
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html
[30 Jun 2008 17:59]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:00]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:01]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:02]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:04]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:05]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:07]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:08]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:09]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:10]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:12]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:13]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:14]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:24]
Bugs System
Pushed into 5.1.25-maria-alpha
[30 Jun 2008 18:36]
Bugs System
Pushed into 5.1.25-maria-alpha