Commit fd930082 authored by marko's avatar marko

branches/zip: Adjust the fix of Issue #182 in r4269 per Inaam's suggestion.

btr_check_blob_fil_page_type(): Replace the parameter
const char* op
with
ibool read.  Do not print anything about page type mismatch
when reading a BLOB page in Antelope format.
Print space id before page number.
parent 30313d6e
...@@ -4124,7 +4124,7 @@ btr_check_blob_fil_page_type( ...@@ -4124,7 +4124,7 @@ btr_check_blob_fil_page_type(
ulint space_id, /* in: space id */ ulint space_id, /* in: space id */
ulint page_no, /* in: page number */ ulint page_no, /* in: page number */
const page_t* page, /* in: page */ const page_t* page, /* in: page */
const char* op) /* in: operation (for diagnostics) */ ibool read) /* in: TRUE=read, FALSE=purge */
{ {
ulint type = fil_page_get_type(page); ulint type = fil_page_get_type(page);
...@@ -4134,6 +4134,14 @@ btr_check_blob_fil_page_type( ...@@ -4134,6 +4134,14 @@ btr_check_blob_fil_page_type(
if (UNIV_UNLIKELY(type != FIL_PAGE_TYPE_BLOB)) { if (UNIV_UNLIKELY(type != FIL_PAGE_TYPE_BLOB)) {
ulint flags = fil_space_get_flags(space_id); ulint flags = fil_space_get_flags(space_id);
if (read
&& (flags & DICT_TF_FORMAT_MASK) == DICT_TF_FORMAT_51) {
/* Do not print anything about the type
mismatch when reading a BLOB page that is in
Antelope format. */
return;
}
/* Old versions of InnoDB did not /* Old versions of InnoDB did not
initialize FIL_PAGE_TYPE on BLOB pages. initialize FIL_PAGE_TYPE on BLOB pages.
Ensure that this tablespace is in Ensure that this tablespace is in
...@@ -4142,9 +4150,9 @@ btr_check_blob_fil_page_type( ...@@ -4142,9 +4150,9 @@ btr_check_blob_fil_page_type(
ut_print_timestamp(stderr); ut_print_timestamp(stderr);
fprintf(stderr, fprintf(stderr,
" InnoDB: FIL_PAGE_TYPE=%lu" " InnoDB: FIL_PAGE_TYPE=%lu"
" on BLOB %s page %lu space %lu flags %lx\n", " on BLOB %s space %lu page %lu flags %lx\n",
(ulong) type, op, (ulong) type, read ? "read" : "purge",
(ulong) page_no, (ulong) space_id, (ulong) flags); (ulong) space_id, (ulong) page_no, (ulong) flags);
/* The garbage in FIL_PAGE_TYPE will /* The garbage in FIL_PAGE_TYPE will
only be tolerated in tables in old only be tolerated in tables in old
...@@ -4308,7 +4316,7 @@ btr_free_externally_stored_field( ...@@ -4308,7 +4316,7 @@ btr_free_externally_stored_field(
} else { } else {
ut_a(!page_zip); ut_a(!page_zip);
btr_check_blob_fil_page_type(space_id, page_no, page, btr_check_blob_fil_page_type(space_id, page_no, page,
"free"); FALSE);
next_page_no = mach_read_from_4( next_page_no = mach_read_from_4(
page + FIL_PAGE_DATA page + FIL_PAGE_DATA
...@@ -4455,7 +4463,7 @@ btr_copy_blob_prefix( ...@@ -4455,7 +4463,7 @@ btr_copy_blob_prefix(
buf_block_dbg_add_level(block, SYNC_EXTERN_STORAGE); buf_block_dbg_add_level(block, SYNC_EXTERN_STORAGE);
page = buf_block_get_frame(block); page = buf_block_get_frame(block);
btr_check_blob_fil_page_type(space_id, page_no, page, "read"); btr_check_blob_fil_page_type(space_id, page_no, page, TRUE);
blob_header = page + offset; blob_header = page + offset;
part_len = btr_blob_get_part_len(blob_header); part_len = btr_blob_get_part_len(blob_header);
......
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