Commit 4b26ec8b authored by Marko Mäkelä's avatar Marko Mäkelä

Adjust btr_assert_not_corrupted()

parent d9cd11dc
...@@ -65,7 +65,7 @@ btr_corruption_report( ...@@ -65,7 +65,7 @@ btr_corruption_report(
const buf_block_t* block, /*!< in: corrupted block */ const buf_block_t* block, /*!< in: corrupted block */
const dict_index_t* index) /*!< in: index tree */ const dict_index_t* index) /*!< in: index tree */
{ {
ib::error() ib::fatal()
<< "Flag mismatch in page " << block->page.id << "Flag mismatch in page " << block->page.id
<< " index " << index->name << " index " << index->name
<< " of table " << index->table->name; << " of table " << index->table->name;
......
...@@ -187,12 +187,14 @@ btr_corruption_report( ...@@ -187,12 +187,14 @@ btr_corruption_report(
/** Assert that a B-tree page is not corrupted. /** Assert that a B-tree page is not corrupted.
@param block buffer block containing a B-tree page @param block buffer block containing a B-tree page
@param index the B-tree index */ @param index the B-tree index */
#define btr_assert_not_corrupted(block, index) \ inline void
if ((ibool) !!page_is_comp(buf_block_get_frame(block)) \ btr_assert_not_corrupted(const buf_block_t* block, const dict_index_t* index)
!= dict_table_is_comp((index)->table)) { \ {
btr_corruption_report(block, index); \ if (!!page_is_comp(block->frame)
ut_error; \ != index->table->not_redundant() && !index->dual_format()) {
btr_corruption_report(block, index);
} }
}
/**************************************************************//** /**************************************************************//**
Gets the root node of a tree and sx-latches it for segment access. Gets the root node of a tree and sx-latches it for segment access.
......
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