mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge 10.2 into 10.3
This commit is contained in:
@ -2058,7 +2058,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
locks.
|
||||
*/
|
||||
trans_rollback_implicit(thd);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
}
|
||||
|
||||
thd->cleanup_after_query();
|
||||
@ -2123,7 +2123,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
ulonglong options= (ulonglong) (uchar) packet[0];
|
||||
if (trans_commit_implicit(thd))
|
||||
break;
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
if (check_global_access(thd,RELOAD_ACL))
|
||||
break;
|
||||
general_log_print(thd, command, NullS);
|
||||
@ -2156,7 +2156,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
if (trans_commit_implicit(thd))
|
||||
break;
|
||||
close_thread_tables(thd);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
my_ok(thd);
|
||||
break;
|
||||
}
|
||||
@ -2971,7 +2971,7 @@ err:
|
||||
/* Close tables and release metadata locks. */
|
||||
close_thread_tables(thd);
|
||||
DBUG_ASSERT(!thd->locked_tables_mode);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -3694,7 +3694,7 @@ mysql_execute_command(THD *thd)
|
||||
/* Commit the normal transaction if one is active. */
|
||||
bool commit_failed= trans_commit_implicit(thd);
|
||||
/* Release metadata locks acquired in this transaction. */
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
if (commit_failed)
|
||||
{
|
||||
WSREP_DEBUG("implicit commit failed, MDL released: %lld",
|
||||
@ -4938,7 +4938,7 @@ mysql_execute_command(THD *thd)
|
||||
{
|
||||
res= trans_commit_implicit(thd);
|
||||
thd->locked_tables_list.unlock_locked_tables(thd);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
thd->variables.option_bits&= ~(OPTION_TABLE_LOCK);
|
||||
}
|
||||
if (thd->global_read_lock.is_acquired())
|
||||
@ -4952,7 +4952,7 @@ mysql_execute_command(THD *thd)
|
||||
res= trans_commit_implicit(thd);
|
||||
thd->locked_tables_list.unlock_locked_tables(thd);
|
||||
/* Release transactional metadata locks. */
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
if (res)
|
||||
goto error;
|
||||
|
||||
@ -5533,7 +5533,7 @@ mysql_execute_command(THD *thd)
|
||||
DBUG_PRINT("info", ("Executing SQLCOM_BEGIN thd: %p", thd));
|
||||
if (trans_begin(thd, lex->start_transaction_opt))
|
||||
{
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
WSREP_DEBUG("BEGIN failed, MDL released: %lld",
|
||||
(longlong) thd->thread_id);
|
||||
goto error;
|
||||
@ -5551,7 +5551,7 @@ mysql_execute_command(THD *thd)
|
||||
(thd->variables.completion_type == 2 &&
|
||||
lex->tx_release != TVL_NO));
|
||||
bool commit_failed= trans_commit(thd);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
if (commit_failed)
|
||||
{
|
||||
WSREP_DEBUG("COMMIT failed, MDL released: %lld",
|
||||
@ -5602,7 +5602,7 @@ mysql_execute_command(THD *thd)
|
||||
(thd->variables.completion_type == 2 &&
|
||||
lex->tx_release != TVL_NO));
|
||||
bool rollback_failed= trans_rollback(thd);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
|
||||
if (rollback_failed)
|
||||
{
|
||||
@ -5915,7 +5915,6 @@ mysql_execute_command(THD *thd)
|
||||
case SQLCOM_XA_COMMIT:
|
||||
{
|
||||
bool commit_failed= trans_xa_commit(thd);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
if (commit_failed)
|
||||
{
|
||||
WSREP_DEBUG("XA commit failed, MDL released: %lld",
|
||||
@ -5933,7 +5932,6 @@ mysql_execute_command(THD *thd)
|
||||
case SQLCOM_XA_ROLLBACK:
|
||||
{
|
||||
bool rollback_failed= trans_xa_rollback(thd);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
if (rollback_failed)
|
||||
{
|
||||
WSREP_DEBUG("XA rollback failed, MDL released: %lld",
|
||||
@ -6161,7 +6159,7 @@ finish:
|
||||
*/
|
||||
THD_STAGE_INFO(thd, stage_rollback_implicit);
|
||||
trans_rollback_implicit(thd);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
}
|
||||
else if (stmt_causes_implicit_commit(thd, CF_IMPLICIT_COMMIT_END))
|
||||
{
|
||||
@ -6175,7 +6173,7 @@ finish:
|
||||
/* Commit the normal transaction if one is active. */
|
||||
trans_commit_implicit(thd);
|
||||
thd->get_stmt_da()->set_overwrite_status(false);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
}
|
||||
}
|
||||
else if (! thd->in_sub_stmt && ! thd->in_multi_stmt_transaction_mode())
|
||||
@ -6190,7 +6188,7 @@ finish:
|
||||
- If in autocommit mode, or outside a transactional context,
|
||||
automatically release metadata locks of the current statement.
|
||||
*/
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
}
|
||||
else if (! thd->in_sub_stmt)
|
||||
{
|
||||
@ -6214,7 +6212,7 @@ finish:
|
||||
{
|
||||
WSREP_DEBUG("Forcing release of transactional locks for thd: %lld",
|
||||
(longlong) thd->thread_id);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
thd->release_transactional_locks();
|
||||
}
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
|
Reference in New Issue
Block a user