Fix a deadlock in the initial patch. lock_validate() must not hold the
lock system mutex while s-latching a block, because some functions,
such as lock_rec_convert_impl_to_expl(), may be already holding an x-latch
on the block that lock_validate() is interested in while attempting to
acquire the lock system mutex.
This deadlock was not caught by UNIV_SYNC_DEBUG because of
buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK).
The upstream fixed other instances this assertion might come up by the following commit in 5.5.
$ bzr log -r 3400 ------- ------- ------- ------- ------- ------- ------- ---- >PAGE.FILE_ PAGE_WAS_ FREE
-------
revno: 3400
committer: Marko Mäkelä <email address hidden>
branch nick: mysql-5.5
timestamp: Tue 2011-05-24 23:08:22 +0300
message:
Bug#12584374 LOCK_VALIDATE TRIPS ASSERTION !BLOCK-
Fix a deadlock in the initial patch. lock_validate() must not hold the convert_ impl_to_ expl(), may be already holding an x-latch
lock system mutex while s-latching a block, because some functions,
such as lock_rec_
on the block that lock_validate() is interested in while attempting to
acquire the lock system mutex.
This deadlock was not caught by UNIV_SYNC_DEBUG because of dbg_add_ level(block, SYNC_NO_ ORDER_CHECK) .
buf_block_