diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-06 14:01:15 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-06 14:01:15 +0300 |
commit | 6b45355e6bd70e77fcd4dd4d0ef74608bafc9b02 (patch) | |
tree | 445534792a690fb31fd7c333a1e8186691111191 /storage/innobase/buf | |
parent | 641baa5d03131ba528d5e6a36da3514f5c9b8ab2 (diff) | |
download | mariadb-git-6b45355e6bd70e77fcd4dd4d0ef74608bafc9b02.tar.gz |
MDEV-13103 Assertion `flags & BUF_PAGE_PRINT_NO_CRASH' failed in buf_page_print
buf_page_print(): Remove the parameter 'flags',
and when a server abort is intended, perform that in the caller.
In this way, page corruption reports due to different reasons
can be distinguished better.
This is non-functional code refactoring that does not fix any
page corruption issues. The change is only made to avoid falsely
grouping together unrelated causes of page corruption.
Diffstat (limited to 'storage/innobase/buf')
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 34 | ||||
-rw-r--r-- | storage/innobase/buf/buf0dblwr.cc | 10 |
2 files changed, 14 insertions, 30 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 39cf089c350..518d5ad323d 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -776,19 +776,12 @@ buf_page_is_corrupted( return(FALSE); } -/********************************************************************//** -Prints a page to stderr. */ +/** Dump a page to stderr. +@param[in] read_buf database page +@param[in] zip_size compressed page size, or 0 for uncompressed */ UNIV_INTERN void -buf_page_print( -/*===========*/ - const byte* read_buf, /*!< in: a database page */ - ulint zip_size, /*!< in: compressed page size, or - 0 for uncompressed pages */ - ulint flags) /*!< in: 0 or - BUF_PAGE_PRINT_NO_CRASH or - BUF_PAGE_PRINT_NO_FULL */ - +buf_page_print(const byte* read_buf, ulint zip_size) { #ifndef UNIV_HOTBACKUP dict_index_t* index; @@ -799,14 +792,12 @@ buf_page_print( size = UNIV_PAGE_SIZE; } - if (!(flags & BUF_PAGE_PRINT_NO_FULL)) { - ut_print_timestamp(stderr); - fprintf(stderr, - " InnoDB: Page dump in ascii and hex (%lu bytes):\n", - size); - ut_print_buf(stderr, read_buf, size); - fputs("\nInnoDB: End of page dump\n", stderr); - } + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: Page dump in ascii and hex (%lu bytes):\n", + size); + ut_print_buf(stderr, read_buf, size); + fputs("\nInnoDB: End of page dump\n", stderr); if (zip_size) { /* Print compressed page. */ @@ -956,8 +947,6 @@ buf_page_print( stderr); break; } - - ut_ad(flags & BUF_PAGE_PRINT_NO_CRASH); } #ifndef UNIV_HOTBACKUP @@ -4244,8 +4233,7 @@ corrupt: "InnoDB: You may have to recover" " from a backup.\n", bpage->offset); - buf_page_print(frame, buf_page_get_zip_size(bpage), - BUF_PAGE_PRINT_NO_CRASH); + buf_page_print(frame, buf_page_get_zip_size(bpage)); fprintf(stderr, "InnoDB: Database page corruption on disk" " or a failed\n" diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index a752c3dfda5..7c78bf99379 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -533,16 +533,12 @@ buf_dblwr_process() page, zip_size)) { fprintf(stderr, "InnoDB: Dump of the page:\n"); - buf_page_print( - read_buf, zip_size, - BUF_PAGE_PRINT_NO_CRASH); + buf_page_print(read_buf, zip_size); fprintf(stderr, "InnoDB: Dump of" " corresponding page" " in doublewrite buffer:\n"); - buf_page_print( - page, zip_size, - BUF_PAGE_PRINT_NO_CRASH); + buf_page_print(page, zip_size); fprintf(stderr, "InnoDB: Also the page in the" @@ -726,7 +722,7 @@ buf_dblwr_assert_on_corrupt_block( /*==============================*/ const buf_block_t* block) /*!< in: block to check */ { - buf_page_print(block->frame, 0, BUF_PAGE_PRINT_NO_CRASH); + buf_page_print(block->frame, 0); ut_print_timestamp(stderr); fprintf(stderr, |