1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge tag '11.1' into 11.2

MariaDB 11.1.3 release
This commit is contained in:
Oleksandr Byelkin
2023-11-14 18:28:37 +01:00
608 changed files with 15628 additions and 9174 deletions

View File

@ -1972,15 +1972,16 @@ inline bool is_prepared_xa(THD *thd)
static bool trans_cannot_safely_rollback(THD *thd, bool all)
{
DBUG_ASSERT(ending_trans(thd, all));
ulong binlog_format= thd->wsrep_binlog_format(thd->variables.binlog_format);
return ((thd->variables.option_bits & OPTION_BINLOG_THIS_TRX) ||
(trans_has_updated_non_trans_table(thd) &&
thd->wsrep_binlog_format() == BINLOG_FORMAT_STMT) ||
binlog_format == BINLOG_FORMAT_STMT) ||
(thd->transaction->all.has_modified_non_trans_temp_table() &&
thd->wsrep_binlog_format() == BINLOG_FORMAT_MIXED) ||
binlog_format == BINLOG_FORMAT_MIXED) ||
(trans_has_updated_non_trans_table(thd) &&
ending_single_stmt_trans(thd,all) &&
thd->wsrep_binlog_format() == BINLOG_FORMAT_MIXED) ||
binlog_format == BINLOG_FORMAT_MIXED) ||
is_prepared_xa(thd));
}
@ -2208,6 +2209,7 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all)
}
else if (likely(!error))
{
ulong binlog_format= thd->wsrep_binlog_format(thd->variables.binlog_format);
if (is_ending_trans && trans_cannot_safely_rollback(thd, all))
error= binlog_rollback_flush_trx_cache(thd, all, cache_mngr);
/*
@ -2224,9 +2226,9 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all)
(!(thd->transaction->stmt.has_created_dropped_temp_table() &&
!thd->is_current_stmt_binlog_format_row()) &&
(!stmt_has_updated_non_trans_table(thd) ||
thd->wsrep_binlog_format() != BINLOG_FORMAT_STMT) &&
binlog_format != BINLOG_FORMAT_STMT) &&
(!thd->transaction->stmt.has_modified_non_trans_temp_table() ||
thd->wsrep_binlog_format() != BINLOG_FORMAT_MIXED)))
binlog_format != BINLOG_FORMAT_MIXED)))
error= binlog_truncate_trx_cache(thd, cache_mngr, all);
}