Commit 3eadb135 authored by Monty's avatar Monty

Fixed access to uninitalized memory found by valgrind

parent a7c4e85d
...@@ -1958,7 +1958,7 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type, ...@@ -1958,7 +1958,7 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type,
pos= my_b_tell(log); pos= my_b_tell(log);
if (repl_semisync_master.update_sync_header(info->thd, if (repl_semisync_master.update_sync_header(info->thd,
(uchar*) packet->c_ptr(), (uchar*) packet->c_ptr_safe(),
info->log_file_name + info->dirlen, info->log_file_name + info->dirlen,
pos, &need_sync)) pos, &need_sync))
{ {
...@@ -1982,7 +1982,8 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type, ...@@ -1982,7 +1982,8 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type,
} }
} }
if (need_sync && repl_semisync_master.flush_net(info->thd, packet->c_ptr())) if (need_sync && repl_semisync_master.flush_net(info->thd,
packet->c_ptr_safe()))
{ {
info->error= ER_UNKNOWN_ERROR; info->error= ER_UNKNOWN_ERROR;
return "Failed to run hook 'after_send_event'"; return "Failed to run hook 'after_send_event'";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment