maria-developers team mailing list archive
Mailing list archive
Re: 17548c8a8b6: MDEV-25477 Auto-create breaks replication when triggering event was not replicated
> I attached the patch and this still fails rpl.create_or_replace_row.
small mistake in the patch:
> --- a/sql/sql_class.h
> +++ b/sql/sql_class.h
> @@ -2916,7 +2916,7 @@ class THD: public THD_count, /* this must be first */
> bool binlog_need_stmt_format(bool is_transactional) const
> - return vers_created_partitions && !binlog_get_pending_rows_event(is_transactional);
> + return !binlog_get_pending_rows_event(is_transactional);
if you put here
log_current_statement && !binlog_get_pending_rows_event(is_transactional)
then all tests pass.
> bool binlog_for_noop_dml(bool transactional_table);
> Why don't you like vers_created_partitions? It might be useful info
> for debugging and for new features.
I have a second patch that renames flags to have a very well-defined
meaning and name.
OPTION_KEEP_LOG -> OPTION_BINLOG_THIS_TRX
log_current_statement -> OPTION_BINLOG_THIS_STMT
the first flag means that when a transaction is rolled back, it's
written to binlog with ROLLBACK at the end, not discarded.
The second means that the statement is written to binlog (or binlog trx
cache) even if it otherwise wouldn't be.
So, two flags. Clear names and semantics. "vers_created_partitions" fits
into the second use case, so one should use OPTION_BINLOG_THIS_STMT for it.
VP of MariaDB Server Engineering