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(
const buf_block_t* block, /*!< in: corrupted block */
const dict_index_t* index) /*!< in: index tree */
{
ib::error()
ib::fatal()
<< "Flag mismatch in page " << block->page.id
<< " index " << index->name
<< " of table " << index->table->name;
......
......@@ -187,12 +187,14 @@ btr_corruption_report(
/** Assert that a B-tree page is not corrupted.
@param block buffer block containing a B-tree page
@param index the B-tree index */
#define btr_assert_not_corrupted(block, index) \
if ((ibool) !!page_is_comp(buf_block_get_frame(block)) \
!= dict_table_is_comp((index)->table)) { \
btr_corruption_report(block, index); \
ut_error; \
inline void
btr_assert_not_corrupted(const buf_block_t* block, const dict_index_t* index)
{
if (!!page_is_comp(block->frame)
!= 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.
......
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