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/include | |
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/include')
-rw-r--r-- | storage/innobase/include/btr0btr.ic | 2 | ||||
-rw-r--r-- | storage/innobase/include/buf0buf.h | 20 | ||||
-rw-r--r-- | storage/innobase/include/page0page.ic | 2 |
3 files changed, 6 insertions, 18 deletions
diff --git a/storage/innobase/include/btr0btr.ic b/storage/innobase/include/btr0btr.ic index 2ad01259924..3f765a56d9d 100644 --- a/storage/innobase/include/btr0btr.ic +++ b/storage/innobase/include/btr0btr.ic @@ -265,7 +265,7 @@ btr_node_ptr_get_child_page_no( "InnoDB: a nonsensical page number 0" " in a node ptr record at offset %lu\n", (ulong) page_offset(rec)); - buf_page_print(page_align(rec), 0, 0); + buf_page_print(page_align(rec), 0); ut_ad(0); } diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 78e961d91b7..cddab05f84d 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -722,25 +722,13 @@ buf_print(void); /*============*/ #endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */ #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. */ +/** 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) UNIV_COLD MY_ATTRIBUTE((nonnull)); /********************************************************************//** Decompress a block. diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic index a4d3bd40426..feb50b6a475 100644 --- a/storage/innobase/include/page0page.ic +++ b/storage/innobase/include/page0page.ic @@ -783,7 +783,7 @@ page_rec_get_next_low( (void*) rec, (ulong) page_get_space_id(page), (ulong) page_get_page_no(page)); - buf_page_print(page, 0, 0); + buf_page_print(page, 0); ut_error; } else if (offs == 0) { |