mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
SHOW STATUS does not anymore change local status variables (except com_show_status). Global status variables are still updated.
SHOW STATUS are not anymore put in slow query log because of no index usage. Implemntation done by removing orig_sql_command and moving logic of SHOW STATUS to mysql_excute_command() This simplifies code and allows us to remove some if statements all over the code. Upgraded uc_update_queries[] to sql_command_flags and added more bitmaps to better categorize commands. This allowed some overall simplifaction when testing sql_command. Fixes bugs: Bug#10210: running SHOW STATUS increments counters it shouldn't Bug#19764: SHOW commands end up in the slow log as table scans
This commit is contained in:
@ -516,6 +516,31 @@ void add_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var)
|
||||
/* it doesn't make sense to add last_query_cost values */
|
||||
}
|
||||
|
||||
/*
|
||||
Add the difference between two status variable arrays to another one.
|
||||
|
||||
SYNOPSIS
|
||||
add_diff_to_status
|
||||
to_var add to this array
|
||||
from_var from this array
|
||||
dec_var minus this array
|
||||
|
||||
NOTE
|
||||
This function assumes that all variables are long/ulong.
|
||||
*/
|
||||
|
||||
void add_diff_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var,
|
||||
STATUS_VAR *dec_var)
|
||||
{
|
||||
ulong *end= (ulong*) ((byte*) to_var + offsetof(STATUS_VAR,
|
||||
last_system_status_var) +
|
||||
sizeof(ulong));
|
||||
ulong *to= (ulong*) to_var, *from= (ulong*) from_var, *dec= (ulong*) dec_var;
|
||||
|
||||
while (to != end)
|
||||
*(to++)+= *(from++) - *(dec++);
|
||||
}
|
||||
|
||||
|
||||
void THD::awake(THD::killed_state state_to_set)
|
||||
{
|
||||
|
Reference in New Issue
Block a user