diff options
author | Michael Widenius <monty@mysql.com> | 2010-08-11 00:58:08 +0300 |
---|---|---|
committer | Michael Widenius <monty@mysql.com> | 2010-08-11 00:58:08 +0300 |
commit | e6cf286b5dcebc78332cdf05d6e20d9ae39d1875 (patch) | |
tree | c4d8cb450285d0fde8c68d02091c3dd0cd7b3c60 /storage/maria/maria_chk.c | |
parent | 0f75abc459beee1ebbb66de124d2a88ecc0d75a2 (diff) | |
download | mariadb-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/maria_chk.c')
-rw-r--r-- | storage/maria/maria_chk.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/storage/maria/maria_chk.c b/storage/maria/maria_chk.c index 985e9d2bc85..6b194eee96f 100644 --- a/storage/maria/maria_chk.c +++ b/storage/maria/maria_chk.c @@ -71,6 +71,14 @@ static const char *record_formats[]= "Fixed length", "Packed", "Compressed", "Block", "?" }; +static const char *bitmap_description[]= +{ + "Empty page", "Part filled head page","Part filled head page", + "Part filled head page", "Full head page", + "Part filled tail page","Part filled tail page", + "Full tail or blob page" +}; + static const char *maria_stats_method_str="nulls_unequal"; static char default_open_errmsg[]= "%d when opening MARIA-table '%s'"; static char default_close_errmsg[]= "%d when closing MARIA-table '%s'"; @@ -106,7 +114,9 @@ int main(int argc, char **argv) error=0; maria_init(); - if (ma_control_file_open(FALSE, opt_require_control_file) && + maria_block_size= 0; /* Use block size from control file */ + if (ma_control_file_open(FALSE, opt_require_control_file || + !(check_param.testflag & T_SILENT)) && (opt_require_control_file || (opt_transaction_logging && (check_param.testflag & T_REP_ANY)))) { @@ -1516,7 +1526,7 @@ static void descript(HA_CHECK *param, register MARIA_HA *info, char *name) printf("Using only keys '%s' of %d possibly keys\n", buff, share->base.keys); } - puts("\ntable description:"); + puts("\nTable description:"); printf("Key Start Len Index Type"); if (param->testflag & T_VERBOSE) printf(" Rec/key Root Blocksize"); @@ -1658,6 +1668,14 @@ static void descript(HA_CHECK *param, register MARIA_HA *info, char *name) } VOID(putchar('\n')); } + if (share->data_file_type == BLOCK_RECORD) + { + uint i; + puts("\nBitmap Data size Description"); + for (i=0 ; i <= 7 ; i++) + printf("%u %5u %s\n", i, share->bitmap.sizes[i], + bitmap_description[i]); + } } DBUG_VOID_RETURN; } /* describe */ |