MCPcopy Create free account
hub / github.com/MariaDB/server / reset_transmit_packet

Function reset_transmit_packet

sql/sql_repl.cc:364–386  ·  view source on GitHub ↗

Reset thread transmit packet buffer for event sending This function allocates header bytes for event transmission, and should be called before store the event data to the packet buffer. */

Source from the content-addressed store, hash-verified

362 should be called before store the event data to the packet buffer.
363*/
364static int reset_transmit_packet(binlog_send_info *info, ushort flags,
365 ulong *ev_offset, const char **errmsg)
366{
367 int ret= 0;
368 String *packet= &info->thd->packet;
369
370 /* reserve and set default header */
371 packet->length(0);
372 packet->set("\0", 1, &my_charset_bin);
373
374 if (info->thd->semi_sync_slave)
375 {
376 if (repl_semisync_master.reserve_sync_header(packet))
377 {
378 info->error= ER_UNKNOWN_ERROR;
379 *errmsg= "Failed to run hook 'reserve_header'";
380 ret= 1;
381 }
382 }
383
384 *ev_offset= packet->length();
385 return ret;
386}
387
388int get_user_var_int(const char *name,
389 long long int *value, int *null_value)

Callers 8

fake_rotate_eventFunction · 0.85
send_heartbeat_eventFunction · 0.85
is_until_reachedFunction · 0.85
send_eventsFunction · 0.85
send_engine_eventsFunction · 0.85
mysql_binlog_sendFunction · 0.85

Calls 3

reserve_sync_headerMethod · 0.80
lengthMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected