mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
cleanup: log_current_statement and OPTION_KEEP_LOG
rename OPTION_KEEP_LOG -> OPTION_BINLOG_THIS_TRX. Meaning: transaction cache will be written to binlog even on rollback. convert log_current_statement to OPTION_BINLOG_THIS_STMT. Meaning: the statement will be written to binlog (or trx binlog cache) even if it normally wouldn't be. setting OPTION_BINLOG_THIS_STMT must always set OPTION_BINLOG_THIS_TRX, otherwise the statement won't be logged if the transaction is rolled back. Use OPTION_BINLOG_THIS to set both.
This commit is contained in:
committed by
Aleksey Midenkov
parent
c8bcb6e809
commit
93e64d1f58
@ -4344,7 +4344,7 @@ void select_insert::abort_result_set()
|
||||
changed= (info.copied || info.deleted || info.updated);
|
||||
transactional_table= table->file->has_transactions_and_rollback();
|
||||
if (thd->transaction->stmt.modified_non_trans_table ||
|
||||
thd->log_current_statement)
|
||||
thd->log_current_statement())
|
||||
{
|
||||
if (!can_rollback_data())
|
||||
thd->transaction->all.modified_non_trans_table= TRUE;
|
||||
@ -5225,7 +5225,7 @@ void select_create::abort_result_set()
|
||||
|
||||
drop_open_table(thd, table, &create_table->db, &create_table->table_name);
|
||||
table=0; // Safety
|
||||
if (thd->log_current_statement)
|
||||
if (thd->log_current_statement())
|
||||
{
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
|
Reference in New Issue
Block a user