summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2021-08-20 12:54:53 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2021-09-03 09:07:03 +0300
commit1bc82aaf0a7746c0921a94034aff2d51f0d75cd0 (patch)
treeae9ebd0f09182fab0974fc78d6de1a00dea50900 /sql/sql_parse.cc
parent21ce69123c130e170b3bc3892ec859e4bc1999ca (diff)
downloadmariadb-git-1bc82aaf0a7746c0921a94034aff2d51f0d75cd0.tar.gz
MDEV-26352 : Add new thread states for certain WSREP scenarios
This adds following new thread states: * waiting to execute in isolation - DDL is waiting to execute in TOI mode. * waiting for TOI DDL - some other statement is waiting for DDL to complete. * waiting for flow control - some statement is paused while flow control is in effect. * waiting for certification - the transaction is being certified.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 2a48c8fb1ce..d5d061b1242 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -6126,7 +6126,12 @@ finish:
thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK;
if (wsrep_thd_is_toi(thd) || wsrep_thd_is_in_rsu(thd))
+ {
+ WSREP_DEBUG("mysql_execute_command for %s", wsrep_thd_query(thd));
+ THD_STAGE_INFO(thd, stage_waiting_isolation);
wsrep_to_isolation_end(thd);
+ }
+
/*
Force release of transactional locks if not in active MST and wsrep is on.
*/
@@ -7890,7 +7895,8 @@ static bool wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act)));
});
WSREP_DEBUG("wsrep retrying AC query: %lu %s",
- thd->wsrep_retry_counter, wsrep_thd_query(thd));
+ thd->wsrep_retry_counter,
+ wsrep_thd_query(thd));
wsrep_prepare_for_autocommit_retry(thd, rawbuf, length, parser_state);
if (thd->lex->explain)
delete_explain_query(thd->lex);