diff options
author | Andrei Elkin <andrei.elkin@mariadb.com> | 2021-09-14 19:34:16 +0300 |
---|---|---|
committer | Brandon Nesterenko <brandon.nesterenko@mariadb.com> | 2021-11-01 11:01:34 -0600 |
commit | f8e9e925322bf11eabc58e3ccd13b963fb98753e (patch) | |
tree | f5bb409c0a3008ae24ac573f1e230c96732ac6b3 | |
parent | 76a583a411f7b5f278d4b3c9c0248d78aaef7fb0 (diff) | |
download | mariadb-git-f8e9e925322bf11eabc58e3ccd13b963fb98753e.tar.gz |
Standalone GTID group does not end with any of Xid, Commit or ROLLBACK.
-rw-r--r-- | client/mysqlbinlog.cc | 4 | ||||
-rw-r--r-- | sql/log_event.h | 2 | ||||
-rw-r--r-- | sql/log_event_client.cc | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index b31439c2d66..a766e46b79f 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1042,6 +1042,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, gtid.seq_no= gle->seq_no; if (!domain_gtid_filter->exclude(>id)) ev->activate_current_event_group(); + ev->last_gtid_standalone= + (gle->flags2 & Gtid_log_event::FL_STANDALONE) ? true : false; } /* @@ -3447,4 +3449,4 @@ struct encryption_service_st encryption_handler= #include "sql_list.cc" #include "rpl_filter.cc" #include "compat56.cc" -#include "rpl_gtid.cc"
\ No newline at end of file +#include "rpl_gtid.cc" diff --git a/sql/log_event.h b/sql/log_event.h index 520209d8fde..abd9ddc89e7 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -1311,6 +1311,8 @@ public: */ static my_bool m_is_event_group_filtering_enabled; + static my_bool last_gtid_standalone; // gtid type of last seen gtid + /* Notify that all events part of the current group should be printed */ diff --git a/sql/log_event_client.cc b/sql/log_event_client.cc index 0fc2fc3f17e..ba51631c447 100644 --- a/sql/log_event_client.cc +++ b/sql/log_event_client.cc @@ -326,6 +326,7 @@ static inline bool is_enum_or_set_type(uint type) { my_bool Log_event::m_is_event_group_active= FALSE; my_bool Log_event::m_is_event_group_filtering_enabled= FALSE; +my_bool Log_event::last_gtid_standalone= FALSE; /* Log_event::print_header() @@ -2017,7 +2018,7 @@ bool Query_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info) This marks the end of an event group. All events prior to this have been printed, need to reset the tracking for future event groups */ - if (is_commit()) + if (is_commit() || is_rollback() || last_gtid_standalone) deactivate_current_event_group(); #endif |