MCPcopy Create free account
hub / github.com/MariaDB/server / reset_slow_query_state

Method reset_slow_query_state

sql/sql_class.cc:6405–6432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6403/* Reset variables related to slow query log */
6404
6405void THD::reset_slow_query_state(Sub_statement_state *backup)
6406{
6407 affected_rows= 0;
6408 max_tmp_space_used= 0;
6409 bytes_sent_old= status_var.bytes_sent;
6410 m_examined_row_count= 0;
6411 m_sent_row_count= 0;
6412 query_plan_flags= QPLAN_INIT;
6413 query_plan_fsort_passes= 0;
6414 tmp_tables_disk_used= 0;
6415 tmp_tables_size= 0;
6416 tmp_tables_used= 0;
6417 if (backup && (backup->in_stored_procedure= in_stored_procedure()))
6418 {
6419 /*
6420 For stored procedures, we want to see stats in show processlist
6421 for the current statement, not for the call to stored procedure.
6422 This is because 'show processlist' shows the stored procedure
6423 query string, not the CALL query.
6424 */
6425 examined_row_count_for_statement= 0;
6426 sent_row_count_for_statement= 0;
6427 }
6428 if ((variables.log_slow_verbosity & LOG_SLOW_VERBOSITY_ENGINE))
6429 handler_stats.reset();
6430 else
6431 handler_stats.active= 0;
6432}
6433
6434/*
6435 Add back the stored values to the current counters to be able to get

Callers 1

executeMethod · 0.80

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected