summaryrefslogtreecommitdiff
path: root/storage/maria/ma_control_file.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@mysql.com>2010-08-11 00:58:08 +0300
committerMichael Widenius <monty@mysql.com>2010-08-11 00:58:08 +0300
commite6cf286b5dcebc78332cdf05d6e20d9ae39d1875 (patch)
treec4d8cb450285d0fde8c68d02091c3dd0cd7b3c60 /storage/maria/ma_control_file.c
parent0f75abc459beee1ebbb66de124d2a88ecc0d75a2 (diff)
downloadmariadb-git-e6cf286b5dcebc78332cdf05d6e20d9ae39d1875.tar.gz
Fixed LP#605798 RQG: Table corruption after Maria engine recovery - "Wrong data in bitmap"
maria_chk & maria_read_log now reads block size from control file. mysql-test/suite/maria/r/maria.result: Updated results after trivial change of maria_chk's output storage/maria/ma_bitmap.c: More DBUG_PRINT storage/maria/ma_blockrec.c: Fixed bug that we didn't mark page full in bitmap if directory is full storage/maria/ma_check.c: Write out if directory is full for errors in bitmap storage/maria/ma_control_file.c: Don't give error for wrong block size if block size is 0 storage/maria/maria_chk.c: Read block size from control file In case of -dvv, write also out bitmap information (good for debugging) storage/maria/maria_read_log.c: Read block size from control file Fixed that maria_read_log works with different page size than TRANSLOG_PAGE_SIZE
Diffstat (limited to 'storage/maria/ma_control_file.c')
-rw-r--r--storage/maria/ma_control_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/maria/ma_control_file.c b/storage/maria/ma_control_file.c
index 1e1fc34c77e..ac246f09337 100644
--- a/storage/maria/ma_control_file.c
+++ b/storage/maria/ma_control_file.c
@@ -398,7 +398,7 @@ CONTROL_FILE_ERROR ma_control_file_open(my_bool create_if_missing,
}
new_block_size= uint2korr(buffer + CF_BLOCKSIZE_OFFSET);
- if (new_block_size != maria_block_size)
+ if (new_block_size != maria_block_size && maria_block_size)
{
error= CONTROL_FILE_WRONG_BLOCKSIZE;
sprintf(errmsg_buff,
@@ -407,6 +407,7 @@ CONTROL_FILE_ERROR ma_control_file_open(my_bool create_if_missing,
errmsg= errmsg_buff;
goto err;
}
+ maria_block_size= new_block_size;
if (my_checksum(0, buffer, new_cf_create_time_size - CF_CHECKSUM_SIZE) !=
uint4korr(buffer + new_cf_create_time_size - CF_CHECKSUM_SIZE))