diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-06-28 17:20:19 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-06-28 17:27:47 +0300 |
commit | e786a57255dcfff0e10ba688c8a21a1fc5573f00 (patch) | |
tree | 1a1f59fd2ec40f0ce0841854d027f8a0adbb7f0b | |
parent | 6ce20fb2b9fe57330c797694b9dbea4028f40d7c (diff) | |
download | mariadb-git-e786a57255dcfff0e10ba688c8a21a1fc5573f00.tar.gz |
Output more information when assertion
ut_a(state == BUF_BLOCK_NOT_USED
|| state == BUF_BLOCK_REMOVE_HASH);
is hit.
-rw-r--r-- | storage/innobase/include/buf0buf.ic | 14 | ||||
-rw-r--r-- | storage/xtradb/include/buf0buf.ic | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic index 5b66d65dcba..e77c5a84202 100644 --- a/storage/innobase/include/buf0buf.ic +++ b/storage/innobase/include/buf0buf.ic @@ -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; 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; |