| 453 | */ |
| 454 | |
| 455 | void |
| 456 | Diagnostics_area::set_eof_status(THD *thd) |
| 457 | { |
| 458 | DBUG_ENTER("set_eof_status"); |
| 459 | /* Only allowed to report eof if has not yet reported an error */ |
| 460 | DBUG_ASSERT(! is_set()); |
| 461 | /* |
| 462 | In production, refuse to overwrite an error or a custom response |
| 463 | with an EOF packet. |
| 464 | */ |
| 465 | if (is_error() || is_disabled()) |
| 466 | return; |
| 467 | |
| 468 | /* |
| 469 | If inside a stored procedure, do not return the total |
| 470 | number of warnings, since they are not available to the client |
| 471 | anyway. |
| 472 | */ |
| 473 | m_statement_warn_count= current_statement_warn_count(); |
| 474 | |
| 475 | m_status= DA_EOF; |
| 476 | DBUG_VOID_RETURN; |
| 477 | } |
| 478 | |
| 479 | /** |
| 480 | Set ERROR status in the Diagnostics Area. This function should be used to |