1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-09 22:24:09 +03:00

Output more information when assertion

ut_a(state == BUF_BLOCK_NOT_USED
     || state == BUF_BLOCK_REMOVE_HASH);
is hit.
This commit is contained in:
Jan Lindström
2016-06-28 17:20:19 +03:00
parent 6ce20fb2b9
commit e786a57255
2 changed files with 28 additions and 0 deletions

View File

@@ -302,6 +302,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;

View File

@@ -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;