From 3f5cee8f541c3f9119bf37a3f4d7e58a46dd7e7c Mon Sep 17 00:00:00 2001 From: Kristian Nielsen Date: Wed, 21 Jun 2023 21:45:29 +0200 Subject: [PATCH] Fix one case that should not be marked transactional in the GTID event The case is statement format and mixed InnoDB/MyISAM without binlog_direct_non_trans_update. Fix due to Brandon Nesterenko. Reviewed-by: Andrei Elkin Signed-off-by: Kristian Nielsen --- sql/log_event.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index bafcf34cc2e..181a26ccdb5 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -8013,7 +8013,10 @@ Gtid_log_event::Gtid_log_event(THD *thd_arg, uint64 seq_no_arg, thd_arg->transaction.all.has_created_dropped_temp_table() || thd_arg->transaction.all.trans_executed_admin_cmd()) flags2|= FL_DDL; - else if (is_transactional && !is_tmp_table) + else if (is_transactional && !is_tmp_table && + !(thd_arg->transaction.all.modified_non_trans_table && + thd->variables.binlog_direct_non_trans_update == 0 && + !thd->is_current_stmt_binlog_format_row())) flags2|= FL_TRANSACTIONAL; if (!(thd_arg->variables.option_bits & OPTION_RPL_SKIP_PARALLEL)) flags2|= FL_ALLOW_PARALLEL;