Commit e786a572 authored by Jan Lindström's avatar Jan Lindström

Output more information when assertion

ut_a(state == BUF_BLOCK_NOT_USED
     || state == BUF_BLOCK_REMOVE_HASH);
is hit.
parent 6ce20fb2
...@@ -302,6 +302,20 @@ buf_page_set_state( ...@@ -302,6 +302,20 @@ buf_page_set_state(
ut_a(state == BUF_BLOCK_NOT_USED); ut_a(state == BUF_BLOCK_NOT_USED);
break; break;
case BUF_BLOCK_FILE_PAGE: 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 ut_a(state == BUF_BLOCK_NOT_USED
|| state == BUF_BLOCK_REMOVE_HASH); || state == BUF_BLOCK_REMOVE_HASH);
break; break;
......
...@@ -305,6 +305,20 @@ buf_page_set_state( ...@@ -305,6 +305,20 @@ buf_page_set_state(
ut_a(state == BUF_BLOCK_NOT_USED); ut_a(state == BUF_BLOCK_NOT_USED);
break; break;
case BUF_BLOCK_FILE_PAGE: 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 ut_a(state == BUF_BLOCK_NOT_USED
|| state == BUF_BLOCK_REMOVE_HASH); || state == BUF_BLOCK_REMOVE_HASH);
break; break;
......
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