diff options
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 31 | ||||
-rw-r--r-- | storage/innobase/buf/buf0dblwr.cc | 2 | ||||
-rw-r--r-- | storage/innobase/fil/fil0crypt.cc | 7 | ||||
-rw-r--r-- | storage/innobase/fil/fil0pagecompress.cc | 6 | ||||
-rw-r--r-- | storage/innobase/include/buf0buf.h | 23 | ||||
-rw-r--r-- | storage/innobase/row/row0sel.cc | 5 |
6 files changed, 30 insertions, 44 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index ad93238410e..eac8cf7c924 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -1173,28 +1173,20 @@ buf_page_is_corrupted( } #ifndef UNIV_INNOCHECKSUM - -/** Prints a page to stderr. -@param[in] read_buf a database page -@param[in] page_size page size -@param[in] flags 0 or BUF_PAGE_PRINT_NO_CRASH or -BUF_PAGE_PRINT_NO_FULL */ +/** Dump a page to stderr. +@param[in] read_buf database page +@param[in] page_size page size */ +UNIV_INTERN void -buf_page_print( - const byte* read_buf, - const page_size_t& page_size, - ulint flags) +buf_page_print(const byte* read_buf, const page_size_t& page_size) { dict_index_t* index; - if (!(flags & BUF_PAGE_PRINT_NO_FULL)) { - - ib::info() << "Page dump in ascii and hex (" - << page_size.physical() << " bytes):"; + ib::info() << "Page dump in ascii and hex (" + << page_size.physical() << " bytes):"; - ut_print_buf(stderr, read_buf, page_size.physical()); - fputs("\nInnoDB: End of page dump\n", stderr); - } + ut_print_buf(stderr, read_buf, page_size.physical()); + fputs("\nInnoDB: End of page dump\n", stderr); if (page_size.is_compressed()) { /* Print compressed page. */ @@ -1359,8 +1351,6 @@ buf_page_print( stderr); break; } - - ut_ad(flags & BUF_PAGE_PRINT_NO_CRASH); } # ifdef PFS_GROUP_BUFFER_SYNC @@ -5984,8 +5974,7 @@ database_corrupted: << ". You may have to recover from " << "a backup."; - buf_page_print(frame, bpage->size, - BUF_PAGE_PRINT_NO_CRASH); + buf_page_print(frame, bpage->size); ib::info() << "It is also possible that your" diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index 17b2229f1da..2bc3630d3f5 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -827,7 +827,7 @@ buf_dblwr_assert_on_corrupt_block( /*==============================*/ const buf_block_t* block) /*!< in: block to check */ { - buf_page_print(block->frame, univ_page_size, BUF_PAGE_PRINT_NO_CRASH); + buf_page_print(block->frame, univ_page_size); ib::fatal() << "Apparent corruption of an index page " << block->page.id diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc index cdf3d9bd997..5e7e5a2f21b 100644 --- a/storage/innobase/fil/fil0crypt.cc +++ b/storage/innobase/fil/fil0crypt.cc @@ -698,11 +698,12 @@ fil_space_encrypt( fprintf(stderr, "ok %d corrupted %d corrupted1 %d err %d different %d\n", ok , corrupted, corrupted1, err, different); fprintf(stderr, "src_frame\n"); - buf_page_print(src_frame, page_size, BUF_PAGE_PRINT_NO_CRASH); + buf_page_print(src_frame, page_size); fprintf(stderr, "encrypted_frame\n"); - buf_page_print(tmp, page_size, BUF_PAGE_PRINT_NO_CRASH); + buf_page_print(tmp, page_size); fprintf(stderr, "decrypted_frame\n"); - buf_page_print(tmp_mem, page_size, 0); + buf_page_print(tmp_mem, page_size); + ut_ad(0); } free(tmp_mem); diff --git a/storage/innobase/fil/fil0pagecompress.cc b/storage/innobase/fil/fil0pagecompress.cc index 0346a676a1f..58fbb4cd9ef 100644 --- a/storage/innobase/fil/fil0pagecompress.cc +++ b/storage/innobase/fil/fil0pagecompress.cc @@ -313,7 +313,8 @@ fil_compress_page( if (buf_page_is_corrupted(false, uncomp_page, univ_page_size, space)) { - buf_page_print(uncomp_page, univ_page_size, 0); + buf_page_print(uncomp_page, univ_page_size); + ut_ad(0); } ut_free(comp_page); @@ -648,6 +649,7 @@ err_exit: << " compression method: " << fil_get_compression_alg_name(compression_alg) << "."; - buf_page_print(buf, univ_page_size, 0); + buf_page_print(buf, univ_page_size); fil_space_release_for_io(space); + ut_ad(0); } diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 67de1174d25..516898066aa 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -893,24 +893,13 @@ buf_print(void); /*============*/ #endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */ -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. -@param[in] read_buf a database page -@param[in] page_size page size -@param[in] flags 0 or BUF_PAGE_PRINT_NO_CRASH or -BUF_PAGE_PRINT_NO_FULL */ +/** Dump a page to stderr. +@param[in] read_buf database page +@param[in] page_size page size */ +UNIV_INTERN void -buf_page_print( - const byte* read_buf, - const page_size_t& page_size, - ulint flags); - +buf_page_print(const byte* read_buf, const page_size_t& page_size) + ATTRIBUTE_COLD __attribute__((nonnull)); /********************************************************************//** Decompress a block. @return TRUE if successful */ diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index e4503cfdd4e..d83bb2c239a 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -1796,6 +1796,7 @@ rec_loop: switch (err) { case DB_SUCCESS_LOCKED_REC: err = DB_SUCCESS; + /* fall through */ case DB_SUCCESS: break; default: @@ -1856,6 +1857,7 @@ skip_lock: switch (err) { case DB_SUCCESS_LOCKED_REC: err = DB_SUCCESS; + /* fall through */ case DB_SUCCESS: break; default: @@ -4597,6 +4599,7 @@ wait_table_again: switch (err) { case DB_SUCCESS_LOCKED_REC: err = DB_SUCCESS; + /* fall through */ case DB_SUCCESS: break; default: @@ -4679,6 +4682,7 @@ rec_loop: switch (err) { case DB_SUCCESS_LOCKED_REC: err = DB_SUCCESS; + /* fall through */ case DB_SUCCESS: break; default: @@ -4940,6 +4944,7 @@ no_gap_lock: prebuilt->new_rec_locks = 1; } err = DB_SUCCESS; + /* fall through */ case DB_SUCCESS: break; case DB_LOCK_WAIT: |