Merge 10.4 into 10.5

This commit is contained in:
Marko Mäkelä 2021-03-19 13:06:31 +02:00
commit be881ec457
247 changed files with 5089 additions and 6857 deletions

View file

@ -7204,8 +7204,11 @@ static int show_memory_used(THD *thd, SHOW_VAR *var, char *buff,
var->type= SHOW_LONGLONG;
var->value= buff;
if (scope == OPT_GLOBAL)
{
calc_sum_of_all_status_if_needed(status_var);
*(longlong*) buff= (status_var->global_memory_used +
status_var->local_memory_used);
}
else
*(longlong*) buff= status_var->local_memory_used;
return 0;