Merge commit '10.4' into 10.5

This commit is contained in:
Oleksandr Byelkin 2023-07-20 11:54:52 +02:00
commit f52954ef42
310 changed files with 5831 additions and 7026 deletions

View file

@ -220,13 +220,18 @@ static inline bool wsrep_run_commit_hook(THD* thd, bool all)
mysql_mutex_lock(&thd->LOCK_thd_data);
/* Transaction creating sequence is TOI or RSU,
CREATE [TEMPORARY] SEQUENCE = CREATE + INSERT (initial value)
CREATE SEQUENCE = CREATE + INSERT (initial value)
and replicated using statement based replication, thus
the commit hooks will be skipped */
the commit hooks will be skipped.
For TEMPORARY SEQUENCES commit hooks will be done as
CREATE + INSERT is not replicated and needs to be
committed locally. */
if (ret &&
(thd->wsrep_cs().mode() == wsrep::client_state::m_toi ||
thd->wsrep_cs().mode() == wsrep::client_state::m_rsu) &&
thd->lex->sql_command == SQLCOM_CREATE_SEQUENCE)
thd->lex->sql_command == SQLCOM_CREATE_SEQUENCE &&
!thd->lex->tmp_table())
ret= false;
mysql_mutex_unlock(&thd->LOCK_thd_data);