mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-33064: Sync trx->wsrep state from THD on trx start
InnoDB transactions may be reused after committed: - when taken from the transaction pool - during a DDL operation execution In this case wsrep flag on trx object is cleared, which may cause wrong execution logic afterwards (wsrep-related hooks are not run). Make trx->wsrep flag initialize from THD object only once on InnoDB transaction start and don't change it throughout the transaction's lifetime. The flag is reset at commit time as before. Unconditionally set wsrep=OFF for THD objects that represent InnoDB background threads. Make Wsrep_schema::store_view() operate in its own transaction. Fix streaming replication transactions' fragments rollback to not switch THD->wsrep value during transaction's execution (use THD->wsrep_ignore_table as a workaround). Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
committed by
Julius Goryavsky
parent
4b0ac5a12b
commit
901c6c7ab6
@ -5083,6 +5083,9 @@ MYSQL_THD create_background_thd()
|
||||
thd->real_id= 0;
|
||||
thd->thread_id= 0;
|
||||
thd->query_id= 0;
|
||||
#ifdef WITH_WSREP
|
||||
thd->variables.wsrep_on= FALSE;
|
||||
#endif /* WITH_WSREP */
|
||||
return thd;
|
||||
}
|
||||
|
||||
@ -6347,7 +6350,8 @@ int THD::decide_logging_format(TABLE_LIST *tables)
|
||||
wsrep_is_active(this) &&
|
||||
variables.wsrep_trx_fragment_size > 0)
|
||||
{
|
||||
if (!is_current_stmt_binlog_format_row())
|
||||
if (!is_current_stmt_binlog_disabled() &&
|
||||
!is_current_stmt_binlog_format_row())
|
||||
{
|
||||
my_message(ER_NOT_SUPPORTED_YET,
|
||||
"Streaming replication not supported with "
|
||||
|
Reference in New Issue
Block a user