Commit 39100cd9 authored by Marko Mäkelä's avatar Marko Mäkelä

Bug #13651627 Move ut_ad(0) from the beginning to the end of buf_page_print(),

print page dump

buf_page_print(): Remove the ut_ad(0) from the beginning. Add two flags
(enum buf_page_print_flags) that can be bitwise-ORed together:

BUF_PAGE_PRINT_NO_CRASH:
  Do not crash debug builds at the end of buf_page_print().
BUF_PAGE_PRINT_NO_FULL:
  Do not print the full page dump. This can be useful when adding
  diagnostic printout to flushing or to the doublewrite buffer.

trx_sys_doublewrite_init_or_restore_page(): Replace exit(1) with ut_error,
so that we can get a core dump if this extraordinary condition happens.

rb:924 approved by Sunny Bains
parent 99ce9430
...@@ -56,11 +56,12 @@ btr_corruption_report( ...@@ -56,11 +56,12 @@ btr_corruption_report(
(unsigned) buf_block_get_space(block), (unsigned) buf_block_get_space(block),
(unsigned) buf_block_get_page_no(block), (unsigned) buf_block_get_page_no(block),
index->name, index->table_name); index->name, index->table_name);
buf_page_print(buf_block_get_frame(block), 0);
if (block->page.zip.data) { if (block->page.zip.data) {
buf_page_print(block->page.zip.data, buf_page_print(block->page.zip.data,
buf_block_get_zip_size(block)); buf_block_get_zip_size(block),
BUF_PAGE_PRINT_NO_CRASH);
} }
buf_page_print(buf_block_get_frame(block), 0, 0);
} }
#ifdef UNIV_BLOB_DEBUG #ifdef UNIV_BLOB_DEBUG
...@@ -1215,9 +1216,11 @@ btr_page_get_father_node_ptr_func( ...@@ -1215,9 +1216,11 @@ btr_page_get_father_node_ptr_func(
!= page_no)) { != page_no)) {
rec_t* print_rec; rec_t* print_rec;
fputs("InnoDB: Dump of the child page:\n", stderr); fputs("InnoDB: Dump of the child page:\n", stderr);
buf_page_print(page_align(user_rec), 0); buf_page_print(page_align(user_rec), 0,
BUF_PAGE_PRINT_NO_CRASH);
fputs("InnoDB: Dump of the parent page:\n", stderr); fputs("InnoDB: Dump of the parent page:\n", stderr);
buf_page_print(page_align(node_ptr), 0); buf_page_print(page_align(node_ptr), 0,
BUF_PAGE_PRINT_NO_CRASH);
fputs("InnoDB: Corruption of an index tree: table ", stderr); fputs("InnoDB: Corruption of an index tree: table ", stderr);
ut_print_name(stderr, NULL, TRUE, index->table_name); ut_print_name(stderr, NULL, TRUE, index->table_name);
...@@ -1654,8 +1657,8 @@ btr_page_reorganize_low( ...@@ -1654,8 +1657,8 @@ btr_page_reorganize_low(
if (UNIV_UNLIKELY(data_size1 != data_size2) if (UNIV_UNLIKELY(data_size1 != data_size2)
|| UNIV_UNLIKELY(max_ins_size1 != max_ins_size2)) { || UNIV_UNLIKELY(max_ins_size1 != max_ins_size2)) {
buf_page_print(page, 0); buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(temp_page, 0); buf_page_print(temp_page, 0, BUF_PAGE_PRINT_NO_CRASH);
fprintf(stderr, fprintf(stderr,
"InnoDB: Error: page old data size %lu" "InnoDB: Error: page old data size %lu"
" new data size %lu\n" " new data size %lu\n"
...@@ -1666,6 +1669,7 @@ btr_page_reorganize_low( ...@@ -1666,6 +1669,7 @@ btr_page_reorganize_low(
(unsigned long) data_size1, (unsigned long) data_size2, (unsigned long) data_size1, (unsigned long) data_size2,
(unsigned long) max_ins_size1, (unsigned long) max_ins_size1,
(unsigned long) max_ins_size2); (unsigned long) max_ins_size2);
ut_ad(0);
} else { } else {
success = TRUE; success = TRUE;
} }
...@@ -3867,7 +3871,7 @@ btr_index_rec_validate( ...@@ -3867,7 +3871,7 @@ btr_index_rec_validate(
(ulong) rec_get_n_fields_old(rec), (ulong) n); (ulong) rec_get_n_fields_old(rec), (ulong) n);
if (dump_on_error) { if (dump_on_error) {
buf_page_print(page, 0); buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
fputs("InnoDB: corrupt record ", stderr); fputs("InnoDB: corrupt record ", stderr);
rec_print_old(stderr, rec); rec_print_old(stderr, rec);
...@@ -3905,7 +3909,8 @@ btr_index_rec_validate( ...@@ -3905,7 +3909,8 @@ btr_index_rec_validate(
(ulong) i, (ulong) len, (ulong) fixed_size); (ulong) i, (ulong) len, (ulong) fixed_size);
if (dump_on_error) { if (dump_on_error) {
buf_page_print(page, 0); buf_page_print(page, 0,
BUF_PAGE_PRINT_NO_CRASH);
fputs("InnoDB: corrupt record ", stderr); fputs("InnoDB: corrupt record ", stderr);
rec_print_new(stderr, rec, offsets); rec_print_new(stderr, rec, offsets);
...@@ -4115,8 +4120,8 @@ loop: ...@@ -4115,8 +4120,8 @@ loop:
btr_validate_report2(index, level, block, right_block); btr_validate_report2(index, level, block, right_block);
fputs("InnoDB: broken FIL_PAGE_NEXT" fputs("InnoDB: broken FIL_PAGE_NEXT"
" or FIL_PAGE_PREV links\n", stderr); " or FIL_PAGE_PREV links\n", stderr);
buf_page_print(page, 0); buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(right_page, 0); buf_page_print(right_page, 0, BUF_PAGE_PRINT_NO_CRASH);
ret = FALSE; ret = FALSE;
} }
...@@ -4125,8 +4130,8 @@ loop: ...@@ -4125,8 +4130,8 @@ loop:
!= page_is_comp(page))) { != page_is_comp(page))) {
btr_validate_report2(index, level, block, right_block); btr_validate_report2(index, level, block, right_block);
fputs("InnoDB: 'compact' flag mismatch\n", stderr); fputs("InnoDB: 'compact' flag mismatch\n", stderr);
buf_page_print(page, 0); buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(right_page, 0); buf_page_print(right_page, 0, BUF_PAGE_PRINT_NO_CRASH);
ret = FALSE; ret = FALSE;
...@@ -4149,8 +4154,8 @@ loop: ...@@ -4149,8 +4154,8 @@ loop:
fputs("InnoDB: records in wrong order" fputs("InnoDB: records in wrong order"
" on adjacent pages\n", stderr); " on adjacent pages\n", stderr);
buf_page_print(page, 0); buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(right_page, 0); buf_page_print(right_page, 0, BUF_PAGE_PRINT_NO_CRASH);
fputs("InnoDB: record ", stderr); fputs("InnoDB: record ", stderr);
rec = page_rec_get_prev(page_get_supremum_rec(page)); rec = page_rec_get_prev(page_get_supremum_rec(page));
...@@ -4199,8 +4204,8 @@ loop: ...@@ -4199,8 +4204,8 @@ loop:
fputs("InnoDB: node pointer to the page is wrong\n", fputs("InnoDB: node pointer to the page is wrong\n",
stderr); stderr);
buf_page_print(father_page, 0); buf_page_print(father_page, 0, BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0); buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
fputs("InnoDB: node ptr ", stderr); fputs("InnoDB: node ptr ", stderr);
rec_print(stderr, node_ptr, index); rec_print(stderr, node_ptr, index);
...@@ -4232,8 +4237,10 @@ loop: ...@@ -4232,8 +4237,10 @@ loop:
btr_validate_report1(index, level, block); btr_validate_report1(index, level, block);
buf_page_print(father_page, 0); buf_page_print(father_page, 0,
buf_page_print(page, 0); BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page, 0,
BUF_PAGE_PRINT_NO_CRASH);
fputs("InnoDB: Error: node ptrs differ" fputs("InnoDB: Error: node ptrs differ"
" on levels > 0\n" " on levels > 0\n"
...@@ -4278,9 +4285,15 @@ loop: ...@@ -4278,9 +4285,15 @@ loop:
btr_validate_report1(index, level, btr_validate_report1(index, level,
block); block);
buf_page_print(father_page, 0); buf_page_print(
buf_page_print(page, 0); father_page, 0,
buf_page_print(right_page, 0); BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
right_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
} }
} else { } else {
page_t* right_father_page page_t* right_father_page
...@@ -4298,10 +4311,18 @@ loop: ...@@ -4298,10 +4311,18 @@ loop:
btr_validate_report1(index, level, btr_validate_report1(index, level,
block); block);
buf_page_print(father_page, 0); buf_page_print(
buf_page_print(right_father_page, 0); father_page, 0,
buf_page_print(page, 0); BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(right_page, 0); buf_page_print(
right_father_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
right_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
} }
if (page_get_page_no(right_father_page) if (page_get_page_no(right_father_page)
...@@ -4315,10 +4336,18 @@ loop: ...@@ -4315,10 +4336,18 @@ loop:
btr_validate_report1(index, level, btr_validate_report1(index, level,
block); block);
buf_page_print(father_page, 0); buf_page_print(
buf_page_print(right_father_page, 0); father_page, 0,
buf_page_print(page, 0); BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(right_page, 0); buf_page_print(
right_father_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
page, 0,
BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(
right_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
} }
} }
} }
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc. Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by Portions of this file contain modifications contributed and copyrighted by
...@@ -1176,7 +1176,7 @@ cleanup: ...@@ -1176,7 +1176,7 @@ cleanup:
index->name, (ulong) block->n_pointers); index->name, (ulong) block->n_pointers);
rw_lock_x_unlock(&btr_search_latch); rw_lock_x_unlock(&btr_search_latch);
btr_search_validate(); ut_ad(btr_search_validate());
} else { } else {
rw_lock_x_unlock(&btr_search_latch); rw_lock_x_unlock(&btr_search_latch);
} }
...@@ -1908,7 +1908,9 @@ btr_search_validate(void) ...@@ -1908,7 +1908,9 @@ btr_search_validate(void)
(ulong) block->curr_left_side); (ulong) block->curr_left_side);
if (n_page_dumps < 20) { if (n_page_dumps < 20) {
buf_page_print(page, 0); buf_page_print(
page, 0,
BUF_PAGE_PRINT_NO_CRASH);
n_page_dumps++; n_page_dumps++;
} }
} }
......
...@@ -605,8 +605,12 @@ void ...@@ -605,8 +605,12 @@ void
buf_page_print( buf_page_print(
/*===========*/ /*===========*/
const byte* read_buf, /*!< in: a database page */ const byte* read_buf, /*!< in: a database page */
ulint zip_size) /*!< in: compressed page size, or ulint zip_size, /*!< in: compressed page size, or
0 for uncompressed pages */ 0 for uncompressed pages */
ulint flags) /*!< in: 0 or
BUF_PAGE_PRINT_NO_CRASH or
BUF_PAGE_PRINT_NO_FULL */
{ {
#ifndef UNIV_HOTBACKUP #ifndef UNIV_HOTBACKUP
dict_index_t* index; dict_index_t* index;
...@@ -615,17 +619,18 @@ buf_page_print( ...@@ -615,17 +619,18 @@ buf_page_print(
ulint old_checksum; ulint old_checksum;
ulint size = zip_size; ulint size = zip_size;
ut_ad(0);
if (!size) { if (!size) {
size = UNIV_PAGE_SIZE; size = UNIV_PAGE_SIZE;
} }
ut_print_timestamp(stderr); if (!(flags & BUF_PAGE_PRINT_NO_FULL)) {
fprintf(stderr, " InnoDB: Page dump in ascii and hex (%lu bytes):\n", ut_print_timestamp(stderr);
(ulong) size); fprintf(stderr,
ut_print_buf(stderr, read_buf, size); " InnoDB: Page dump in ascii and hex (%lu bytes):\n",
fputs("\nInnoDB: End of page dump\n", stderr); (ulong) size);
ut_print_buf(stderr, read_buf, size);
fputs("\nInnoDB: End of page dump\n", stderr);
}
if (zip_size) { if (zip_size) {
/* Print compressed page. */ /* Print compressed page. */
...@@ -797,6 +802,8 @@ buf_page_print( ...@@ -797,6 +802,8 @@ buf_page_print(
stderr); stderr);
break; break;
} }
ut_ad(flags & BUF_PAGE_PRINT_NO_CRASH);
} }
#ifndef UNIV_HOTBACKUP #ifndef UNIV_HOTBACKUP
...@@ -3557,7 +3564,8 @@ corrupt: ...@@ -3557,7 +3564,8 @@ corrupt:
"InnoDB: You may have to recover" "InnoDB: You may have to recover"
" from a backup.\n", " from a backup.\n",
(ulong) bpage->offset); (ulong) bpage->offset);
buf_page_print(frame, buf_page_get_zip_size(bpage)); buf_page_print(frame, buf_page_get_zip_size(bpage),
BUF_PAGE_PRINT_NO_CRASH);
fprintf(stderr, fprintf(stderr,
"InnoDB: Database page corruption on disk" "InnoDB: Database page corruption on disk"
" or a failed\n" " or a failed\n"
......
...@@ -757,7 +757,8 @@ buf_flush_buffered_writes(void) ...@@ -757,7 +757,8 @@ buf_flush_buffered_writes(void)
if (UNIV_UNLIKELY if (UNIV_UNLIKELY
(!page_simple_validate_new(block->frame))) { (!page_simple_validate_new(block->frame))) {
corrupted_page: corrupted_page:
buf_page_print(block->frame, 0); buf_page_print(block->frame, 0,
BUF_PAGE_PRINT_NO_CRASH);
ut_print_timestamp(stderr); ut_print_timestamp(stderr);
fprintf(stderr, fprintf(stderr,
......
...@@ -3931,9 +3931,10 @@ ibuf_insert_to_index_page( ...@@ -3931,9 +3931,10 @@ ibuf_insert_to_index_page(
"InnoDB: but the number of fields does not match!\n", "InnoDB: but the number of fields does not match!\n",
stderr); stderr);
dump: dump:
buf_page_print(page, 0); buf_page_print(page, 0, BUF_PAGE_PRINT_NO_CRASH);
dtuple_print(stderr, entry); dtuple_print(stderr, entry);
ut_ad(0);
fputs("InnoDB: The table where where" fputs("InnoDB: The table where where"
" this index record belongs\n" " this index record belongs\n"
...@@ -4506,12 +4507,14 @@ ibuf_merge_or_delete_for_page( ...@@ -4506,12 +4507,14 @@ ibuf_merge_or_delete_for_page(
bitmap_page = ibuf_bitmap_get_map_page(space, page_no, bitmap_page = ibuf_bitmap_get_map_page(space, page_no,
zip_size, &mtr); zip_size, &mtr);
buf_page_print(bitmap_page, 0); buf_page_print(bitmap_page, 0,
BUF_PAGE_PRINT_NO_CRASH);
ibuf_mtr_commit(&mtr); ibuf_mtr_commit(&mtr);
fputs("\nInnoDB: Dump of the page:\n", stderr); fputs("\nInnoDB: Dump of the page:\n", stderr);
buf_page_print(block->frame, 0); buf_page_print(block->frame, 0,
BUF_PAGE_PRINT_NO_CRASH);
fprintf(stderr, fprintf(stderr,
"InnoDB: Error: corruption in the tablespace." "InnoDB: Error: corruption in the tablespace."
...@@ -4531,6 +4534,7 @@ ibuf_merge_or_delete_for_page( ...@@ -4531,6 +4534,7 @@ ibuf_merge_or_delete_for_page(
(ulong) page_no, (ulong) page_no,
(ulong) (ulong)
fil_page_get_type(block->frame)); fil_page_get_type(block->frame));
ut_ad(0);
} }
} }
......
...@@ -277,7 +277,7 @@ btr_node_ptr_get_child_page_no( ...@@ -277,7 +277,7 @@ btr_node_ptr_get_child_page_no(
"InnoDB: a nonsensical page number 0" "InnoDB: a nonsensical page number 0"
" in a node ptr record at offset %lu\n", " in a node ptr record at offset %lu\n",
(ulong) page_offset(rec)); (ulong) page_offset(rec));
buf_page_print(page_align(rec), 0); buf_page_print(page_align(rec), 0, 0);
} }
return(page_no); return(page_no);
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved. Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -680,6 +680,13 @@ buf_print(void); ...@@ -680,6 +680,13 @@ buf_print(void);
/*============*/ /*============*/
#endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */ #endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */
#endif /* !UNIV_HOTBACKUP */ #endif /* !UNIV_HOTBACKUP */
enum buf_page_print_flags {
/** Do not crash at the end of buf_page_print(). */
BUF_PAGE_PRINT_NO_CRASH = 1,
/** Do not print the full page dump. */
BUF_PAGE_PRINT_NO_FULL = 2
};
/********************************************************************//** /********************************************************************//**
Prints a page to stderr. */ Prints a page to stderr. */
UNIV_INTERN UNIV_INTERN
...@@ -687,8 +694,12 @@ void ...@@ -687,8 +694,12 @@ void
buf_page_print( buf_page_print(
/*===========*/ /*===========*/
const byte* read_buf, /*!< in: a database page */ const byte* read_buf, /*!< in: a database page */
ulint zip_size); /*!< in: compressed page size, or ulint zip_size, /*!< in: compressed page size, or
0 for uncompressed pages */ 0 for uncompressed pages */
ulint flags) /*!< in: 0 or
BUF_PAGE_PRINT_NO_CRASH or
BUF_PAGE_PRINT_NO_FULL */
__attribute__((nonnull));
/********************************************************************//** /********************************************************************//**
Decompress a block. Decompress a block.
@return TRUE if successful */ @return TRUE if successful */
......
...@@ -710,7 +710,7 @@ page_rec_get_next_low( ...@@ -710,7 +710,7 @@ page_rec_get_next_low(
(void*) rec, (void*) rec,
(ulong) page_get_space_id(page), (ulong) page_get_space_id(page),
(ulong) page_get_page_no(page)); (ulong) page_get_page_no(page));
buf_page_print(page, 0); buf_page_print(page, 0, 0);
ut_error; ut_error;
} }
......
...@@ -1615,7 +1615,7 @@ lock_sec_rec_some_has_impl_off_kernel( ...@@ -1615,7 +1615,7 @@ lock_sec_rec_some_has_impl_off_kernel(
if (!lock_check_trx_id_sanity(page_get_max_trx_id(page), if (!lock_check_trx_id_sanity(page_get_max_trx_id(page),
rec, index, offsets, TRUE)) { rec, index, offsets, TRUE)) {
buf_page_print(page, 0); buf_page_print(page, 0, 0);
/* The page is corrupt: try to avoid a crash by returning /* The page is corrupt: try to avoid a crash by returning
NULL */ NULL */
......
...@@ -900,7 +900,7 @@ page_cur_parse_insert_rec( ...@@ -900,7 +900,7 @@ page_cur_parse_insert_rec(
ut_print_buf(stderr, ptr2, 300); ut_print_buf(stderr, ptr2, 300);
putc('\n', stderr); putc('\n', stderr);
buf_page_print(page, 0); buf_page_print(page, 0, 0);
ut_error; ut_error;
} }
......
...@@ -148,7 +148,7 @@ page_dir_find_owner_slot( ...@@ -148,7 +148,7 @@ page_dir_find_owner_slot(
fputs("\n" fputs("\n"
"InnoDB: on that page!\n", stderr); "InnoDB: on that page!\n", stderr);
buf_page_print(page, 0); buf_page_print(page, 0, 0);
ut_error; ut_error;
} }
...@@ -569,8 +569,10 @@ page_copy_rec_list_end_no_locks( ...@@ -569,8 +569,10 @@ page_copy_rec_list_end_no_locks(
/* Track an assertion failure reported on the mailing /* Track an assertion failure reported on the mailing
list on June 18th, 2003 */ list on June 18th, 2003 */
buf_page_print(new_page, 0); buf_page_print(new_page, 0,
buf_page_print(page_align(rec), 0); BUF_PAGE_PRINT_NO_CRASH);
buf_page_print(page_align(rec), 0,
BUF_PAGE_PRINT_NO_CRASH);
ut_print_timestamp(stderr); ut_print_timestamp(stderr);
fprintf(stderr, fprintf(stderr,
...@@ -1834,7 +1836,7 @@ page_check_dir( ...@@ -1834,7 +1836,7 @@ page_check_dir(
fprintf(stderr, fprintf(stderr,
"InnoDB: Page directory corruption:" "InnoDB: Page directory corruption:"
" infimum not pointed to\n"); " infimum not pointed to\n");
buf_page_print(page, 0); buf_page_print(page, 0, 0);
} }
if (UNIV_UNLIKELY(!page_rec_is_supremum_low(supremum_offs))) { if (UNIV_UNLIKELY(!page_rec_is_supremum_low(supremum_offs))) {
...@@ -1842,7 +1844,7 @@ page_check_dir( ...@@ -1842,7 +1844,7 @@ page_check_dir(
fprintf(stderr, fprintf(stderr,
"InnoDB: Page directory corruption:" "InnoDB: Page directory corruption:"
" supremum not pointed to\n"); " supremum not pointed to\n");
buf_page_print(page, 0); buf_page_print(page, 0, 0);
} }
} }
#endif /* !UNIV_HOTBACKUP */ #endif /* !UNIV_HOTBACKUP */
...@@ -2546,7 +2548,7 @@ func_exit2: ...@@ -2546,7 +2548,7 @@ func_exit2:
(ulong) page_get_space_id(page), (ulong) page_get_space_id(page),
(ulong) page_get_page_no(page), (ulong) page_get_page_no(page),
index->name); index->name);
buf_page_print(page, 0); buf_page_print(page, 0, 0);
} }
return(ret); return(ret);
......
...@@ -3998,7 +3998,8 @@ rec_loop: ...@@ -3998,7 +3998,8 @@ rec_loop:
wrong_offs: wrong_offs:
if (srv_force_recovery == 0 || moves_up == FALSE) { if (srv_force_recovery == 0 || moves_up == FALSE) {
ut_print_timestamp(stderr); ut_print_timestamp(stderr);
buf_page_print(page_align(rec), 0); buf_page_print(page_align(rec), 0,
BUF_PAGE_PRINT_NO_CRASH);
fprintf(stderr, fprintf(stderr,
"\nInnoDB: rec address %p," "\nInnoDB: rec address %p,"
" buf block fix count %lu\n", " buf block fix count %lu\n",
...@@ -4017,7 +4018,7 @@ wrong_offs: ...@@ -4017,7 +4018,7 @@ wrong_offs:
"InnoDB: restore from a backup, or" "InnoDB: restore from a backup, or"
" dump + drop + reimport the table.\n", " dump + drop + reimport the table.\n",
stderr); stderr);
ut_ad(0);
err = DB_CORRUPTION; err = DB_CORRUPTION;
goto lock_wait_or_error; goto lock_wait_or_error;
......
...@@ -586,12 +586,16 @@ trx_sys_doublewrite_init_or_restore_pages( ...@@ -586,12 +586,16 @@ trx_sys_doublewrite_init_or_restore_pages(
if (buf_page_is_corrupted(page, zip_size)) { if (buf_page_is_corrupted(page, zip_size)) {
fprintf(stderr, fprintf(stderr,
"InnoDB: Dump of the page:\n"); "InnoDB: Dump of the page:\n");
buf_page_print(read_buf, zip_size); buf_page_print(
read_buf, zip_size,
BUF_PAGE_PRINT_NO_CRASH);
fprintf(stderr, fprintf(stderr,
"InnoDB: Dump of" "InnoDB: Dump of"
" corresponding page" " corresponding page"
" in doublewrite buffer:\n"); " in doublewrite buffer:\n");
buf_page_print(page, zip_size); buf_page_print(
page, zip_size,
BUF_PAGE_PRINT_NO_CRASH);
fprintf(stderr, fprintf(stderr,
"InnoDB: Also the page in the" "InnoDB: Also the page in the"
...@@ -605,7 +609,7 @@ trx_sys_doublewrite_init_or_restore_pages( ...@@ -605,7 +609,7 @@ trx_sys_doublewrite_init_or_restore_pages(
"InnoDB: option:\n" "InnoDB: option:\n"
"InnoDB:" "InnoDB:"
" innodb_force_recovery=6\n"); " innodb_force_recovery=6\n");
exit(1); ut_error;
} }
/* Write the good page from the /* Write the good page from the
......
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