Commit e0328736 authored by Alfranio Correia's avatar Alfranio Correia

BUG#51291 Unfortunate effect around variable binlog_direct_non_transactional_updates

Post-merge fix.
parent ae8e6ca5
...@@ -15,6 +15,7 @@ call mtr.add_suppression("Unsafe statement binlogged in statement format since B ...@@ -15,6 +15,7 @@ call mtr.add_suppression("Unsafe statement binlogged in statement format since B
connection slave; connection slave;
call mtr.add_suppression("Master server does not support semi-sync"); call mtr.add_suppression("Master server does not support semi-sync");
call mtr.add_suppression("Semi-sync slave .* reply"); call mtr.add_suppression("Semi-sync slave .* reply");
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT.");
enable_query_log; enable_query_log;
connection master; connection master;
......
...@@ -4245,7 +4245,7 @@ bool use_trans_cache(const THD* thd, bool is_transactional) ...@@ -4245,7 +4245,7 @@ bool use_trans_cache(const THD* thd, bool is_transactional)
return return
((thd->variables.binlog_format != BINLOG_FORMAT_STMT || ((thd->variables.binlog_format != BINLOG_FORMAT_STMT ||
thd->variables.binlog_direct_non_trans_update) ? is_transactional : thd->variables.binlog_direct_non_trans_update) ? is_transactional :
(is_transactional || cache_mngr->trx_cache.empty())); (is_transactional || !cache_mngr->trx_cache.empty()));
} }
/* /*
......
...@@ -3748,7 +3748,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) ...@@ -3748,7 +3748,7 @@ int THD::decide_logging_format(TABLE_LIST *tables)
isolation level but if we have pure repeatable read or serializable the isolation level but if we have pure repeatable read or serializable the
lock history on the slave will be different from the master. lock history on the slave will be different from the master.
*/ */
if (!trans_non_trans_access_engines) if (trans_non_trans_access_engines)
lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_MIXED_STATEMENT); lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_MIXED_STATEMENT);
else if (trans_has_updated_trans_table(this) && !all_trans_write_engines) else if (trans_has_updated_trans_table(this) && !all_trans_write_engines)
lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_NONTRANS_AFTER_TRANS); lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_NONTRANS_AFTER_TRANS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment