[Commits] Rev 3010: Fixed bug lp:814054 'Assertion `block->hash_link == hash_link && hash_link->block == block' in ma_pagecache.c:2275 with Aria' in lp:maria/5.2

Michael Widenius monty at askmonty.org
Wed Aug 10 22:44:40 EEST 2011


At lp:maria/5.2

------------------------------------------------------------
revno: 3010
revision-id: monty at askmonty.org-20110810194439-q07ccs4xx8um9enl
parent: monty at askmonty.org-20110810100819-qy1wgipor2cmndly
fixes bug(s): https://launchpad.net/bugs/814054
committer: Michael Widenius <monty at askmonty.org>
branch nick: maria-5.2
timestamp: Wed 2011-08-10 22:44:39 +0300
message:
  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.
-------------- next part --------------
=== modified file 'storage/maria/ma_pagecache.c'
--- a/storage/maria/ma_pagecache.c	2011-07-04 01:32:53 +0000
+++ b/storage/maria/ma_pagecache.c	2011-08-10 19:44:39 +0000
@@ -2271,8 +2271,14 @@ static PAGECACHE_BLOCK_LINK *find_block(
                           ("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);



More information about the commits mailing list