Commit b5ef802f authored by Michael Widenius's avatar Michael Widenius

Fixed bug lp:814054 'Assertion `block->hash_link == hash_link &&...

Fixed bug lp:814054 'Assertion `block->hash_link == hash_link && hash_link->block == block' in ma_pagecache.c:2275 with Aria'
- Replaced old DBUG_ASSERT with a new correct one + a comment.

storage/maria/ma_pagecache.c:
  Replaced old DBUG_ASSERT with a new correct one + a comment.
parent 397fc34f
......@@ -2271,8 +2271,14 @@ restart:
("block->hash_link: %p hash_link: %p "
"block->status: %u", block->hash_link,
hash_link, block->status ));
KEYCACHE_DBUG_ASSERT(block->hash_link == hash_link &&
hash_link->block == block);
/*
block->hash_link != hash_link can only happen when
the block is in PCBLOCK_IN_SWITCH above (is flushed out
to be replaced by another block). The SWITCH code will change
block->hash_link to point to hash_link.
*/
KEYCACHE_DBUG_ASSERT(block->hash_link == hash_link ||
block->status & PCBLOCK_IN_SWITCH);
page_status= (((block->hash_link == hash_link) &&
(block->status & PCBLOCK_READ)) ?
PAGE_READ : PAGE_WAIT_TO_BE_READ);
......
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