1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-25740 Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())' failed in void wsrep_commit_empty(THD*, bool)

Using ROLLBACK with `completion_type = CHAIN` result in start of
transaction and implicit commit before previous WSREP internal data is
cleared.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
This commit is contained in:
mkaruza
2021-07-26 09:14:37 +02:00
committed by Jan Lindström
parent eb26e20df5
commit 386ac12a48
3 changed files with 28 additions and 0 deletions

View File

@ -5750,6 +5750,11 @@ mysql_execute_command(THD *thd)
/* Begin transaction with the same isolation level. */
if (tx_chain)
{
#ifdef WITH_WSREP
/* If there are pending changes after rollback we should clear them */
if (wsrep_on(thd) && wsrep_has_changes(thd))
wsrep_after_statement(thd);
#endif
if (trans_begin(thd))
goto error;
}