Commit bf096f29 authored by Marko Mäkelä's avatar Marko Mäkelä

Fix btr_corruption_report() declaration on Windows

The Microsoft compiler only allows function attributes before the
function signature, not after it.
parent 61967b90
......@@ -57,13 +57,10 @@ btr_can_merge_with_page(
buf_block_t** merge_block, /*!< out: the merge block */
mtr_t* mtr); /*!< in: mini-transaction */
/**************************************************************//**
Report that an index page is corrupted. */
void
btr_corruption_report(
/*==================*/
const buf_block_t* block, /*!< in: corrupted block */
const dict_index_t* index) /*!< in: index tree */
/** Report that an index page is corrupted.
@param[in] buffer block
@param[in] index tree */
void btr_corruption_report(const buf_block_t* block, const dict_index_t* index)
{
ib::fatal()
<< "Flag mismatch in page " << block->page.id
......
......@@ -172,23 +172,19 @@ record is in spatial index */
| BTR_LATCH_FOR_DELETE \
| BTR_MODIFY_EXTERNAL)))
/**************************************************************//**
Report that an index page is corrupted. */
void
btr_corruption_report(
/*==================*/
const buf_block_t* block, /*!< in: corrupted block */
const dict_index_t* index) /*!< in: index tree */
ATTRIBUTE_COLD ATTRIBUTE_NORETURN __attribute__((nonnull));
/** Report that an index page is corrupted.
@param[in] buffer block
@param[in] index tree */
ATTRIBUTE_COLD ATTRIBUTE_NORETURN __attribute__((nonnull))
void btr_corruption_report(const buf_block_t* block,const dict_index_t* index);
/** 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); \
}
if (!!page_is_comp(buf_block_get_frame(block)) \
!= index->table->not_redundant()) \
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