summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorAndrei Elkin <aelkin@mysql.com>2009-09-29 14:16:23 +0300
committerAndrei Elkin <aelkin@mysql.com>2009-09-29 14:16:23 +0300
commit5983785ef4b04b865ea1d78c8d452642913a83f3 (patch)
treef79e672485606b6da384195da6a4c1c6729ed362 /sql/log_event.cc
parent5d2f79def9b67dd5400411070d47f8180ceb072b (diff)
downloadmariadb-git-5983785ef4b04b865ea1d78c8d452642913a83f3.tar.gz
WL#342 heartbeat
backporting from 6.0 code base to 5.1.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index fb6a5230fda..6c240735d23 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -3643,6 +3643,7 @@ Format_description_log_event(uint8 binlog_ver, const char* server_ver)
post_header_len[UPDATE_ROWS_EVENT-1]=
post_header_len[DELETE_ROWS_EVENT-1]= 6;);
post_header_len[INCIDENT_EVENT-1]= INCIDENT_HEADER_LEN;
+ post_header_len[HEARTBEAT_LOG_EVENT-1]= 0;
// Sanity-check that all post header lengths are initialized.
IF_DBUG({
@@ -9427,3 +9428,16 @@ st_print_event_info::st_print_event_info()
open_cached_file(&body_cache, NULL, NULL, 0, flags);
}
#endif
+
+
+#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
+Heartbeat_log_event::Heartbeat_log_event(const char* buf, uint 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;
+}
+#endif