diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2012-02-02 12:31:57 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2012-02-02 12:31:57 +0200 |
commit | 39100cd98440e3060e2ba2b6ec21b171728bd0eb (patch) | |
tree | e70e0ca4f683e74f2e0fa4c72e35c8d785465717 /storage/innobase/include | |
parent | 99ce9430141f7c834840234935e4557d9311eef4 (diff) | |
download | mariadb-git-39100cd98440e3060e2ba2b6ec21b171728bd0eb.tar.gz |
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
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/btr0btr.ic | 2 | ||||
-rw-r--r-- | storage/innobase/include/buf0buf.h | 15 | ||||
-rw-r--r-- | storage/innobase/include/page0page.ic | 2 |
3 files changed, 15 insertions, 4 deletions
diff --git a/storage/innobase/include/btr0btr.ic b/storage/innobase/include/btr0btr.ic index 1bd22a0ebc6..55bdb289b21 100644 --- a/storage/innobase/include/btr0btr.ic +++ b/storage/innobase/include/btr0btr.ic @@ -277,7 +277,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); + buf_page_print(page_align(rec), 0, 0); } return(page_no); diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 456f077a13d..c8c2830d480 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -1,6 +1,6 @@ /***************************************************************************** -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 the terms of the GNU General Public License as published by the Free Software @@ -680,6 +680,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. */ UNIV_INTERN @@ -687,8 +694,12 @@ void buf_page_print( /*===========*/ 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 */ + ulint flags) /*!< in: 0 or + BUF_PAGE_PRINT_NO_CRASH or + BUF_PAGE_PRINT_NO_FULL */ + __attribute__((nonnull)); /********************************************************************//** Decompress a block. @return TRUE if successful */ diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic index 115cee64f8b..50b4e3808c8 100644 --- a/storage/innobase/include/page0page.ic +++ b/storage/innobase/include/page0page.ic @@ -710,7 +710,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); + buf_page_print(page, 0, 0); ut_error; } |