mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Postfix after merge semi-sync with heartbeat
Use ev_offset instead of 1 as the packet header offset when getting log position from events for heartbeat call reset_transmit_packet before calling send_heartbeat_event sql/sql_repl.cc: Use ev_offset instead of 1 as the packet header offset when getting log position from events for heartbeat call reset_transmit_packet before calling send_heartbeat_event
This commit is contained in:
@ -427,7 +427,6 @@ static int send_heartbeat_event(NET* net, String* packet,
|
|||||||
{
|
{
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
}
|
}
|
||||||
packet->set("\0", 1, &my_charset_bin);
|
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -689,7 +688,7 @@ impossible position";
|
|||||||
log's filename does not change while it's active
|
log's filename does not change while it's active
|
||||||
*/
|
*/
|
||||||
if (coord)
|
if (coord)
|
||||||
coord->pos= uint4korr(packet->ptr() + 1 + LOG_POS_OFFSET);
|
coord->pos= uint4korr(packet->ptr() + ev_offset + LOG_POS_OFFSET);
|
||||||
|
|
||||||
event_type= (Log_event_type)((*packet)[LOG_EVENT_OFFSET+ev_offset]);
|
event_type= (Log_event_type)((*packet)[LOG_EVENT_OFFSET+ev_offset]);
|
||||||
if (event_type == FORMAT_DESCRIPTION_EVENT)
|
if (event_type == FORMAT_DESCRIPTION_EVENT)
|
||||||
@ -849,6 +848,9 @@ impossible position";
|
|||||||
sql_print_information("the rest of heartbeat info skipped ...");
|
sql_print_information("the rest of heartbeat info skipped ...");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
/* reset transmit packet for the heartbeat event */
|
||||||
|
if (reset_transmit_packet(thd, flags, &ev_offset, &errmsg))
|
||||||
|
goto err;
|
||||||
if (send_heartbeat_event(net, packet, coord))
|
if (send_heartbeat_event(net, packet, coord))
|
||||||
{
|
{
|
||||||
errmsg = "Failed on my_net_write()";
|
errmsg = "Failed on my_net_write()";
|
||||||
|
Reference in New Issue
Block a user