diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-05-05 23:03:01 +0300 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-05-05 23:03:01 +0300 |
commit | 509e4990af4d99e9d3c790eabe1c1705ae910b55 (patch) | |
tree | 02d4ca9409711baef3ec163adc402f2c380df7c8 /sql/log_event.cc | |
parent | 0cc811c633d1fe5290b10fa49fad0a4b889383fa (diff) | |
parent | 4f143a88bcb36e94e9edba8a3c5b4a350dcd9bf9 (diff) | |
download | mariadb-git-509e4990af4d99e9d3c790eabe1c1705ae910b55.tar.gz |
Merge branch bb-10.3-release into bb-10.4-release
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 337de3508ed..349e35488e2 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -15143,14 +15143,23 @@ bool copy_event_cache_to_file_and_reinit(IO_CACHE *cache, FILE *file) } #if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) -Heartbeat_log_event::Heartbeat_log_event(const char* buf, uint event_len, +Heartbeat_log_event::Heartbeat_log_event(const char* buf, ulong event_len, const Format_description_log_event* description_event) :Log_event(buf, description_event) { uint8 header_size= description_event->common_header_len; - ident_len = event_len - header_size; - set_if_smaller(ident_len,FN_REFLEN-1); - log_ident= buf + header_size; + if (log_pos == 0) + { + log_pos= uint8korr(buf + header_size); + log_ident= buf + header_size + HB_SUB_HEADER_LEN; + ident_len= event_len - (header_size + HB_SUB_HEADER_LEN); + } + else + { + log_ident= buf + header_size; + ident_len = event_len - header_size; + } + } #endif |