| 311 | */ |
| 312 | |
| 313 | void |
| 314 | Diagnostics_area::reset_diagnostics_area() |
| 315 | { |
| 316 | DBUG_ENTER("reset_diagnostics_area"); |
| 317 | #ifdef DBUG_OFF |
| 318 | m_can_overwrite_status= FALSE; |
| 319 | /** Don't take chances in production */ |
| 320 | m_message[0]= '\0'; |
| 321 | Sql_state_errno::clear(); |
| 322 | Sql_user_condition_identity::clear(); |
| 323 | m_last_insert_id= 0; |
| 324 | if (!is_bulk_op()) |
| 325 | { |
| 326 | m_affected_rows= 0; |
| 327 | m_statement_warn_count= 0; |
| 328 | } |
| 329 | #endif |
| 330 | get_warning_info()->clear_error_condition(); |
| 331 | set_is_sent(false); |
| 332 | /* |
| 333 | For BULK DML operations (e.g. UPDATE) the data member m_status |
| 334 | has the value DA_OK_BULK. Keep this value in order to handle |
| 335 | m_affected_rows, m_statement_warn_count in correct way. Else, |
| 336 | the number of rows and the number of warnings affected by |
| 337 | the last statement executed as part of a trigger fired by the dml |
| 338 | (e.g. UPDATE statement fires a trigger on AFTER UPDATE) would counts |
| 339 | rows modified by trigger's statement. |
| 340 | */ |
| 341 | m_status= is_bulk_op() ? DA_OK_BULK : DA_EMPTY; |
| 342 | DBUG_VOID_RETURN; |
| 343 | } |
| 344 | |
| 345 | |
| 346 | /** |
no test coverage detected