summaryrefslogtreecommitdiff
path: root/sql/log_event.h
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2021-05-05 23:17:20 +0300
committerNikita Malyavin <nikitamalyavin@gmail.com>2021-05-05 23:57:11 +0300
commit3f55c569514679d98e09e71286ca28a8ac667a71 (patch)
tree4347fbb2238d1a97e5e1166f9e7b7b7adba165ce /sql/log_event.h
parentca1dc0789b7e724128d1369977e2f70fb9d69bb5 (diff)
parenta4139f8d68bd31e80ff6202c093cd232c194ddfd (diff)
downloadmariadb-git-3f55c569514679d98e09e71286ca28a8ac667a71.tar.gz
Merge branch bb-10.4-release into bb-10.5-releasemariadb-10.5.10
Diffstat (limited to 'sql/log_event.h')
-rw-r--r--sql/log_event.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/log_event.h b/sql/log_event.h
index 4e193232f4b..3e08653a211 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -576,6 +576,14 @@ class String;
#define MARIA_SLAVE_CAPABILITY_MINE MARIA_SLAVE_CAPABILITY_GTID
+/*
+ When the size of 'log_pos' within Heartbeat_log_event exceeds UINT32_MAX it
+ cannot be accommodated in common_header, as 'log_pos' is of 4 bytes size. In
+ such cases, sub_header, of size 8 bytes will hold larger 'log_pos' value.
+*/
+#define HB_SUB_HEADER_LEN 8
+
+
/**
@enum Log_event_type
@@ -5718,12 +5726,13 @@ bool copy_cache_to_file_wrapped(IO_CACHE *body,
class Heartbeat_log_event: public Log_event
{
public:
- Heartbeat_log_event(const char* buf, uint event_len,
+ uint8 hb_flags;
+ Heartbeat_log_event(const char* buf, ulong event_len,
const Format_description_log_event* description_event);
Log_event_type get_type_code() { return HEARTBEAT_LOG_EVENT; }
bool is_valid() const
{
- return (log_ident != NULL &&
+ return (log_ident != NULL && ident_len <= FN_REFLEN-1 &&
log_pos >= BIN_LOG_HEADER_SIZE);
}
const char * get_log_ident() { return log_ident; }