summaryrefslogtreecommitdiff
path: root/storage/xtradb/include/buf0buf.ic
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/include/buf0buf.ic')
-rw-r--r--storage/xtradb/include/buf0buf.ic14
1 files changed, 14 insertions, 0 deletions
diff --git a/storage/xtradb/include/buf0buf.ic b/storage/xtradb/include/buf0buf.ic
index f7e51231471..7b1c66f2a05 100644
--- a/storage/xtradb/include/buf0buf.ic
+++ b/storage/xtradb/include/buf0buf.ic
@@ -305,6 +305,20 @@ buf_page_set_state(
ut_a(state == BUF_BLOCK_NOT_USED);
break;
case BUF_BLOCK_FILE_PAGE:
+ if (!(state == BUF_BLOCK_NOT_USED
+ || state == BUF_BLOCK_REMOVE_HASH)) {
+ const char *old_state_name = buf_get_state_name((buf_block_t*)bpage);
+ bpage->state = state;
+
+ fprintf(stderr,
+ "InnoDB: Error: block old state %d (%s) "
+ " new state %d (%s) not correct\n",
+ old_state,
+ old_state_name,
+ state,
+ buf_get_state_name((buf_block_t*)bpage));
+ }
+
ut_a(state == BUF_BLOCK_NOT_USED
|| state == BUF_BLOCK_REMOVE_HASH);
break;