mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
References: lp:1233353 - releasing explicit MDL locks for BF aborted transactions
This commit is contained in:
parent
239dcdaa90
commit
4e00dd6861
4 changed files with 16 additions and 3 deletions
|
@ -2737,7 +2737,12 @@ void MDL_context::release_locks_stored_before(enum_mdl_duration duration,
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WITH_WSREP
|
||||||
|
void MDL_context::release_explicit_locks()
|
||||||
|
{
|
||||||
|
release_locks_stored_before(MDL_EXPLICIT, NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
Release all explicit locks in the context which correspond to the
|
Release all explicit locks in the context which correspond to the
|
||||||
same name/object as this lock request.
|
same name/object as this lock request.
|
||||||
|
|
|
@ -678,6 +678,9 @@ public:
|
||||||
|
|
||||||
void release_statement_locks();
|
void release_statement_locks();
|
||||||
void release_transactional_locks();
|
void release_transactional_locks();
|
||||||
|
#ifdef WITH_WSREP
|
||||||
|
void release_explicit_locks();
|
||||||
|
#endif
|
||||||
void rollback_to_savepoint(const MDL_savepoint &mdl_savepoint);
|
void rollback_to_savepoint(const MDL_savepoint &mdl_savepoint);
|
||||||
|
|
||||||
inline THD *get_thd() const { return m_thd; }
|
inline THD *get_thd() const { return m_thd; }
|
||||||
|
|
|
@ -9433,11 +9433,13 @@ void tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
|
||||||
{
|
{
|
||||||
mysql_mutex_assert_owner(&LOCK_open);
|
mysql_mutex_assert_owner(&LOCK_open);
|
||||||
}
|
}
|
||||||
|
#ifdef WITH_WSREP
|
||||||
|
/* if thd was BF aborted, exclusive locks were canceled */
|
||||||
|
#else
|
||||||
DBUG_ASSERT(remove_type == TDC_RT_REMOVE_UNUSED ||
|
DBUG_ASSERT(remove_type == TDC_RT_REMOVE_UNUSED ||
|
||||||
thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name,
|
thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name,
|
||||||
MDL_EXCLUSIVE));
|
MDL_EXCLUSIVE));
|
||||||
|
#endif /* WITH_WSREP */
|
||||||
key_length= create_table_def_key(key, db, table_name);
|
key_length= create_table_def_key(key, db, table_name);
|
||||||
|
|
||||||
if ((share= (TABLE_SHARE*) my_hash_search(&table_def_cache,(uchar*) key,
|
if ((share= (TABLE_SHARE*) my_hash_search(&table_def_cache,(uchar*) key,
|
||||||
|
|
|
@ -8049,6 +8049,9 @@ static void wsrep_client_rollback(THD *thd)
|
||||||
/* Release transactional metadata locks. */
|
/* Release transactional metadata locks. */
|
||||||
thd->mdl_context.release_transactional_locks();
|
thd->mdl_context.release_transactional_locks();
|
||||||
|
|
||||||
|
/* release explicit MDL locks */
|
||||||
|
thd->mdl_context.release_explicit_locks();
|
||||||
|
|
||||||
if (thd->get_binlog_table_maps())
|
if (thd->get_binlog_table_maps())
|
||||||
{
|
{
|
||||||
WSREP_DEBUG("clearing binlog table map for BF abort (%ld)", thd->thread_id);
|
WSREP_DEBUG("clearing binlog table map for BF abort (%ld)", thd->thread_id);
|
||||||
|
|
Loading…
Reference in a new issue