rollbacks may leave stale transactional MDL locks
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
High
|
Teemu Ollakka | |||
5.6 |
Fix Released
|
High
|
Teemu Ollakka | |||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Fix Released
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Certain combination of rollbacks may put thd in such a state that it holds transactional MDL locks even if it has no active transaction going on. This becomes apparent by defining Mdl_context:
inline bool has_transaction
{
return !m_tickets[
}
and putting
DBUG_
at the end of mysql_execute_
Stale locks may cause autocommit selects to cause deadlocks with TOI DDLs when causal reads is on. Thd holding stale lock may be waiting in wsrep_causal_wait() for DDL to be executed while DDL is waiting for MDL lock held by thd waiting in wsrep_causal_
Proposed fix: Force clear of transactional MDL locks whenever there is no active MST at the exit of mysql_execute_
Fixes pushed: bazaar. launchpad. net/~codership/ codership- mysql/5. 5-23/revision/ 3939 bazaar. launchpad. net/~codership/ codership- mysql/wsrep- 5.5/revision/ 3917 bazaar. launchpad. net/~codership/ codership- mysql/5. 6/revision/ 4006
5.5-23: http://
5.5: http://
5.6: http://