1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +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:
Sergei Golubchik
2022-05-06 10:45:17 +03:00
committed by Aleksey Midenkov
parent c8bcb6e809
commit 93e64d1f58
10 changed files with 43 additions and 40 deletions

View File

@@ -3560,8 +3560,10 @@ public:
/* set during loop of derived table processing */
bool derived_tables_processing;
bool tablespace_op; /* This is TRUE in DISCARD/IMPORT TABLESPACE */
/* True if we have to log the current statement */
bool log_current_statement;
bool log_current_statement() const
{
return variables.option_bits & OPTION_BINLOG_THIS_STMT;
}
/**
True if a slave error. Causes the slave to stop. Not the same
as the statement execution error (is_error()), since