Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä 2021-03-19 11:42:44 +02:00
commit 44d70c01f0
244 changed files with 5074 additions and 6848 deletions

View file

@ -7558,8 +7558,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;