| 423 | */ |
| 424 | |
| 425 | void |
| 426 | Diagnostics_area::set_ok_status(ulonglong affected_rows, |
| 427 | ulonglong last_insert_id, |
| 428 | const char *message) |
| 429 | { |
| 430 | DBUG_ENTER("set_ok_status"); |
| 431 | DBUG_ASSERT(! is_set()); |
| 432 | /* |
| 433 | In production, refuse to overwrite an error or a custom response |
| 434 | with an OK packet. |
| 435 | */ |
| 436 | if (is_error() || is_disabled()) |
| 437 | return; |
| 438 | |
| 439 | m_statement_warn_count= current_statement_warn_count(); |
| 440 | m_affected_rows= affected_rows; |
| 441 | m_last_insert_id= last_insert_id; |
| 442 | if (message) |
| 443 | strmake(m_message, message, sizeof(m_message) - 1); |
| 444 | else |
| 445 | m_message[0]= '\0'; |
| 446 | m_status= DA_OK; |
| 447 | DBUG_VOID_RETURN; |
| 448 | } |
| 449 | |
| 450 | |
| 451 | /** |