| 3425 | |
| 3426 | |
| 3427 | bool 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 | |
| 3464 | end: |
| 3465 | reset_for_next_ps_execution(); |
| 3466 | return FALSE; |
| 3467 | } |
| 3468 | |
| 3469 | |
| 3470 | /************************************************************************ |
nothing calls this directly
no test coverage detected