summaryrefslogtreecommitdiff
path: root/sql/log_event.h
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2021-05-04 14:49:31 +0300
committerNikita Malyavin <nikitamalyavin@gmail.com>2021-05-04 14:49:31 +0300
commita8a925dd22ae00494cc9ffdc1ff68906106a408c (patch)
treea857c565a22ec7f6f41d3efa72053a726a346af2 /sql/log_event.h
parent2820f30dde3148df71e1d748ac705d98d60e0787 (diff)
parent72fa9dabadb4b0011f483ccbf1ef59e62d0ef1e0 (diff)
downloadmariadb-git-a8a925dd22ae00494cc9ffdc1ff68906106a408c.tar.gz
Merge branch bb-10.2-release into bb-10.3-release
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 8a342cb5cd3..57282fe58ce 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -570,6 +570,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
@@ -5183,12 +5191,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; }