summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 2a22810b8c2..945343f8d3e 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -821,6 +821,13 @@ static int send_heartbeat_event(binlog_send_info *info,
packet->append(b, sizeof(b));
}
+ if (RUN_HOOK(binlog_transmit, before_send_event,
+ (info->thd, info->flags, packet, 0, 0)))
+ {
+ info->error= ER_UNKNOWN_ERROR;
+ DBUG_RETURN(-1);
+ }
+
if (my_net_write(net, (uchar*) packet->ptr(), packet->length()) ||
net_flush(net))
{
@@ -828,6 +835,13 @@ static int send_heartbeat_event(binlog_send_info *info,
DBUG_RETURN(-1);
}
+ if (RUN_HOOK(binlog_transmit, after_send_event,
+ (info->thd, info->flags, packet)))
+ {
+ info->error= ER_UNKNOWN_ERROR;
+ DBUG_RETURN(-1);
+ }
+
DBUG_RETURN(0);
}