Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
always update global_status_var.global_memory_used
through update_global_memory_status()
  • Loading branch information
vuvova committed Jun 13, 2016
1 parent b2ae32a commit e65703c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sql/sql_class.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1815,11 +1815,10 @@ void add_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var)
DBUG_PRINT("info", ("global memory_used: %lld size: %lld",
(longlong) global_status_var.global_memory_used,
(longlong) from_var->global_memory_used));
update_global_memory_status(from_var->global_memory_used);
}
// workaround for gcc 4.2.4-1ubuntu4 -fPIE (from DEB_BUILD_HARDENING=1)
int64 volatile * volatile ptr= &to_var->global_memory_used;
my_atomic_add64_explicit(ptr, from_var->global_memory_used,
MY_MEMORY_ORDER_RELAXED);
else
to_var->global_memory_used+= from_var->global_memory_used;
}

/*
Expand Down

0 comments on commit e65703c

Please sign in to comment.