MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / set_ok_status

Method set_ok_status

sql/sql_error.cc:425–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423*/
424
425void
426Diagnostics_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/**

Callers 1

my_okFunction · 0.80

Calls 1

strmakeFunction · 0.85

Tested by

no test coverage detected