diff options
-rw-r--r-- | sql/unireg.cc | 2 | ||||
-rw-r--r-- | storage/maria/ma_blockrec.c | 14 | ||||
-rw-r--r-- | storage/maria/ma_key_recover.c | 3 | ||||
-rw-r--r-- | storage/maria/ma_loghandler.c | 6 | ||||
-rwxr-xr-x | storage/maria/ma_test_all.sh | 4 |
5 files changed, 14 insertions, 15 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index da52889fb2f..ae7d3d9d062 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -471,7 +471,7 @@ static uint pack_keys(uchar *keybuff, uint key_count, KEY *keyinfo, int2store(pos+6, key->block_size); pos+=8; key_parts+=key->key_parts; - DBUG_PRINT("loop", ("flags: %d key_parts: %d at 0x%lx", + DBUG_PRINT("loop", ("flags: %d key_parts: %d key_part: 0x%lx", key->flags, key->key_parts, (long) key->key_part)); for (key_part=key->key_part,key_part_end=key_part+key->key_parts ; diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c index fc134df3b99..069d9e95655 100644 --- a/storage/maria/ma_blockrec.c +++ b/storage/maria/ma_blockrec.c @@ -1224,8 +1224,7 @@ static void make_empty_page(MARIA_HA *info, uchar *buff, uint page_type) The code does not assume the block is zeroed. */ if (page_type != BLOB_PAGE) - bzero(buff+ PAGE_HEADER_SIZE, block_size - PAGE_HEADER_SIZE - - DIR_ENTRY_SIZE - PAGE_SUFFIX_SIZE); + bzero(buff+ PAGE_HEADER_SIZE, block_size - PAGE_HEADER_SIZE); #endif buff[PAGE_TYPE_OFFSET]= (uchar) page_type; buff[DIR_COUNT_OFFSET]= 1; @@ -1388,6 +1387,7 @@ static my_bool write_tail(MARIA_HA *info, memcpy(row_pos.data, row_part, length); + if (share->now_transactional) { /* Log changes in tail block */ uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + DIRPOS_STORE_SIZE]; @@ -1541,7 +1541,7 @@ static my_bool write_full_pages(MARIA_HA *info, #ifdef IDENTICAL_PAGES_AFTER_RECOVERY if (copy_length != data_size) bzero(buff + block_size - PAGE_SUFFIX_SIZE - (data_size - copy_length), - (data_size - copy_length)); + (data_size - copy_length) + PAGE_SUFFIX_SIZE); #endif if (!(info->s->options & HA_OPTION_PAGE_CHECKSUM)) @@ -1558,7 +1558,7 @@ static my_bool write_full_pages(MARIA_HA *info, 0, info->trn->rec_lsn)) DBUG_RETURN(1); page++; - block->used= BLOCKUSED_USED; + DBUG_ASSERT(block->used & BLOCKUSED_USED); } DBUG_RETURN(0); } @@ -2560,6 +2560,9 @@ static my_bool write_block_record(MARIA_HA *info, } } } + /* Release not used space in used pages */ + if (_ma_bitmap_release_unused(info, bitmap_blocks)) + goto disk_err; _ma_unpin_all_pages(info, lsn); if (tmp_data_used) @@ -2595,9 +2598,6 @@ static my_bool write_block_record(MARIA_HA *info, goto disk_err; block+= block->sub_blocks; } - /* Release not used space in used pages */ - if (_ma_bitmap_release_unused(info, bitmap_blocks)) - goto disk_err; _ma_finalize_row(info); DBUG_RETURN(0); diff --git a/storage/maria/ma_key_recover.c b/storage/maria/ma_key_recover.c index a62eb0cf0e0..af6830564b0 100644 --- a/storage/maria/ma_key_recover.c +++ b/storage/maria/ma_key_recover.c @@ -72,8 +72,7 @@ my_bool _ma_write_clr(MARIA_HA *info, LSN undo_lsn, my_bool store_checksum, ha_checksum checksum, LSN *res_lsn, void *extra_msg) { - uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE + - PAGE_STORE_SIZE + DIRPOS_STORE_SIZE + + uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE + HA_CHECKSUM_STORE_SIZE]; LEX_STRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; struct st_msg_to_write_hook_for_clr_end msg; diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index c6c8dbd2818..e5e0d4e71bc 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -5185,11 +5185,7 @@ my_bool translog_write_record(LSN *lsn, if (tbl_info) { MARIA_SHARE *share= tbl_info->s; - if (!share->now_transactional) - { - DBUG_PRINT("info", ("It is not transactional table")); - DBUG_RETURN(0); - } + DBUG_ASSERT(share->now_transactional); if (unlikely(share->id == 0)) { /* diff --git a/storage/maria/ma_test_all.sh b/storage/maria/ma_test_all.sh index 96f8bf0ef08..ef12d1340aa 100755 --- a/storage/maria/ma_test_all.sh +++ b/storage/maria/ma_test_all.sh @@ -113,12 +113,16 @@ run_tests() $maria_path/maria_chk$suffix -sm test2 $maria_path/ma_test2$suffix $silent -D -B -c $row_type $maria_path/maria_chk$suffix -sm test2 + rm -f maria_log_control maria_log.* $maria_path/ma_test2$suffix $silent -m10000 -e4096 -K $row_type $maria_path/maria_chk$suffix -sm test2 + rm -f maria_log_control maria_log.* $maria_path/ma_test2$suffix $silent -m10000 -e8192 -K $row_type -P $maria_path/maria_chk$suffix -sm test2 + rm -f maria_log_control maria_log.* $maria_path/ma_test2$suffix $silent -m10000 -e16384 -E16384 -K -L $row_type $maria_path/maria_chk$suffix -sm test2 + rm -f maria_log_control maria_log.* $maria_path/ma_test2$suffix $silent -c -b65000 $row_type $maria_path/maria_chk$suffix -se test2 } |