Hi Sergei, On Sun, Apr 17, 2022 at 8:48 PM Sergei Golubchik <s...@mariadb.org> wrote: > > Hi, Aleksey, > > > 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
Where is your patch? > > 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. > > Regards, > Sergei > VP of MariaDB Server Engineering > and secur...@mariadb.org -- @midenok _______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp