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( ...@@ -57,13 +57,10 @@ btr_can_merge_with_page(
buf_block_t** merge_block, /*!< out: the merge block */ buf_block_t** merge_block, /*!< out: the merge block */
mtr_t* mtr); /*!< in: mini-transaction */ mtr_t* mtr); /*!< in: mini-transaction */
/**************************************************************//** /** Report that an index page is corrupted.
Report that an index page is corrupted. */ @param[in] buffer block
void @param[in] index tree */
btr_corruption_report( void btr_corruption_report(const buf_block_t* block, const dict_index_t* index)
/*==================*/
const buf_block_t* block, /*!< in: corrupted block */
const dict_index_t* index) /*!< in: index tree */
{ {
ib::fatal() ib::fatal()
<< "Flag mismatch in page " << block->page.id << "Flag mismatch in page " << block->page.id
......
...@@ -172,23 +172,19 @@ record is in spatial index */ ...@@ -172,23 +172,19 @@ record is in spatial index */
| BTR_LATCH_FOR_DELETE \ | BTR_LATCH_FOR_DELETE \
| BTR_MODIFY_EXTERNAL))) | BTR_MODIFY_EXTERNAL)))
/**************************************************************//** /** Report that an index page is corrupted.
Report that an index page is corrupted. */ @param[in] buffer block
void @param[in] index tree */
btr_corruption_report( ATTRIBUTE_COLD ATTRIBUTE_NORETURN __attribute__((nonnull))
/*==================*/ void btr_corruption_report(const buf_block_t* block,const dict_index_t* index);
const buf_block_t* block, /*!< in: corrupted block */
const dict_index_t* index) /*!< in: index tree */
ATTRIBUTE_COLD ATTRIBUTE_NORETURN __attribute__((nonnull));
/** 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) \ #define btr_assert_not_corrupted(block, index) \
if ((ibool) !!page_is_comp(buf_block_get_frame(block)) \ if (!!page_is_comp(buf_block_get_frame(block)) \
!= dict_table_is_comp((index)->table)) { \ != index->table->not_redundant()) \
btr_corruption_report(block, index); \ 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