mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-4981: Account for queries handled by query-cache in USER_STATISTICS (and in HOST_STATISTICS)
Added collection statistics for queries resolved via query cache.
This commit is contained in:
@ -4656,7 +4656,8 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
|
||||
/* Count number of empty select queries */
|
||||
if (!thd->sent_row_count)
|
||||
status_var_increment(thd->status_var.empty_queries);
|
||||
status_var_add(thd->status_var.rows_sent, thd->sent_row_count);
|
||||
else
|
||||
status_var_add(thd->status_var.rows_sent, thd->sent_row_count);
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -5790,6 +5791,8 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
|
||||
{
|
||||
/* Update statistics for getting the query from the cache */
|
||||
thd->lex->sql_command= SQLCOM_SELECT;
|
||||
status_var_increment(thd->status_var.com_stat[thd->lex->sql_command]);
|
||||
thd->update_stats();
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
Reference in New Issue
Block a user