summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-11-30 12:24:00 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-11-30 12:52:01 +0200
commit4b26ec8b973794edacd9e451ab9a018c14a0de0a (patch)
tree874684b7b89bea81f0b892fee22e0f57d1c08fb7
parentd9cd11dc36782be1e1fa890919638921d4d836dc (diff)
downloadmariadb-git-4b26ec8b973794edacd9e451ab9a018c14a0de0a.tar.gz
Adjust btr_assert_not_corrupted()
-rw-r--r--storage/innobase/btr/btr0btr.cc2
-rw-r--r--storage/innobase/include/btr0btr.h12
2 files changed, 8 insertions, 6 deletions
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc
index 4bce7495b0c..e5c55d4e838 100644
--- a/storage/innobase/btr/btr0btr.cc
+++ b/storage/innobase/btr/btr0btr.cc
@@ -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;
diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h
index 484bba20a4e..d474b5cb3f0 100644
--- a/storage/innobase/include/btr0btr.h
+++ b/storage/innobase/include/btr0btr.h
@@ -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.