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

Method send_eof

sql/sql_class.cc:3427–3467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3425
3426
3427bool select_send::send_eof()
3428{
3429 /*
3430 Don't send EOF if we're in error condition (which implies we've already
3431 sent or are sending an error)
3432 */
3433 if (thd->is_error() || wsrep_thd_is_aborting(thd))
3434 {
3435 reset_for_next_ps_execution();
3436 return TRUE;
3437 }
3438
3439 ::my_eof(thd);
3440
3441 if (unlikely(thd->lex->sql_command != SQLCOM_SELECT))
3442 goto end; // For DELETE RETURNING
3443
3444 /*
3445 A WSREP connection may encounter a deadlock error because of MDL
3446 conflict after the early eof is sent below. Therefore the early eof
3447 is unsafe for WSREP.
3448 */
3449 if (WSREP(thd))
3450 goto end;
3451
3452 if (likely(!thd->transaction->stmt.is_trx_read_write()))
3453 {
3454 /*
3455 We are executing a readonly statement. Send the result to the
3456 client so that it can process the data while the server is doing
3457 cleanups.
3458 */
3459 thd->push_final_warnings();
3460 thd->update_server_status(); // Needed for slow query status
3461 thd->protocol->end_statement();
3462 }
3463
3464end:
3465 reset_for_next_ps_execution();
3466 return FALSE;
3467}
3468
3469
3470/************************************************************************

Callers

nothing calls this directly

Calls 10

my_eofFunction · 0.85
my_okFunction · 0.85
push_warningFunction · 0.85
push_final_warningsMethod · 0.80
update_server_statusMethod · 0.80
wsrep_thd_is_abortingFunction · 0.70
is_errorMethod · 0.45
is_trx_read_writeMethod · 0.45
end_statementMethod · 0.45

Tested by

no test coverage detected