MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / net_send_eof

Function net_send_eof

sql/protocol.cc:284–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282*/
283
284bool
285net_send_eof(THD *thd, uint server_status, uint statement_warn_count)
286{
287 NET *net= &thd->net;
288 bool error= FALSE;
289 DBUG_ENTER("net_send_eof");
290 /* Set to TRUE if no active vio, to work well in case of --init-file */
291 if (net->vio != 0)
292 {
293 thd->get_stmt_da()->set_overwrite_status(true);
294 error= write_eof_packet(thd, net, server_status, statement_warn_count);
295 if (!error)
296 error= net_flush(net);
297 thd->get_stmt_da()->set_overwrite_status(false);
298 DBUG_PRINT("info", ("EOF sent, so no more error sending allowed"));
299 }
300 DBUG_RETURN(error);
301}
302
303
304/**

Callers 2

send_eofMethod · 0.85

Calls 3

write_eof_packetFunction · 0.85
set_overwrite_statusMethod · 0.80
get_stmt_daMethod · 0.80

Tested by

no test coverage detected