You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix for bug #51136 "Crash in pthread_rwlock_rdlock on
TEMPORARY + HANDLER + LOCK + SP".
Server crashed when one:
1) Opened HANDLER or acquired global read lock
2) Then locked one or several temporary tables with
LOCK TABLES statement (but no base tables).
3) Then issued any statement causing commit (explicit
or implicit).
4) Issued statement which should have closed HANDLER
or released global read lock.
The problem was that when entering LOCK TABLES mode in the
scenario described above we incorrectly set transactional
MDL sentinel to zero. As result during commit all metadata
locks were released (including lock for open HANDLER or
global metadata shared lock). Indeed, attempt to release
metadata lock for the second time which happened during
HANLDER CLOSE or during release of GLR caused crash.
This patch fixes problem by changing MDL_context's
set_trans_sentinel() method to set sentinel to correct
value (it should point to the most recent ticket).
--BZR--
revision-id: [email protected]
property-branch-nick: mysql-next-4284-bg51136
property-file-info: ld7:file_id65:sp1f-handler.test-20010406221832-gfvg6n4rp4py6lunazzembziuu5qxvi57:message95:Added test for bug #51136 "Crash in pthread_rwlock_rdlock on
property-file-info: TEMPORARY + HANDLER + LOCK + SP".4:path30:mysql-test/include/handler.inced7:file_id65:sp1f-flush.result-20010323030458-fknoht4a4rohnwlkdtjcyx653fk3jumx7:message38:Updated test results (see flush.test).4:path25:mysql-test/r/flush.resulted7:file_id73:sp1f-innodb_handler.resul-20020821205505-jopsqbjuqwwxb5hvf3r2wn37vobunxru7:message47:Updated test results (see include/handler.inc).4:path34:mysql-test/r/handler_innodb.resulted7:file_id67:sp1f-handler.result-20010406221832-ybo3cgjo6qapqc6776ivjpdngwmk6plu7:message47:Updated test results (see include/handler.inc).4:path34:mysql-test/r/handler_myisam.resulted7:file_id63:sp1f-flush.test-20010323030458-7rtnbsox2xqacdijdaxl3yeinfs233eo7:message109:Added additional coverage for bug #51136 "Crash in
property-file-info: pthread_rwlock_rdlock on TEMPORARY + HANDLER + LOCK +
property-file-info: SP".4:path23:mysql-test/t/flush.tested7:file_id39:mdl.h-20080523121748-o4y2wcq3maotb9do-17:message321:When setting new value of transactional sentinel use
property-file-info: pointer to the most recent ticket instead of value
property-file-info: returned by MDL_context::mdl_savepoint().
property-file-info: This allows to handle correctly situation when the new
property-file-info: value of sentinel should be the same as its current value
property-file-info: (MDL_context::mdl_savepoint() returns NULL in this case).4:path9:sql/mdl.hee
testament3-sha1: d133366368945a06f2a0f20b107cb4ace4bd9a21
0 commit comments