From 0ee879ff8ac1b80cd9a963015344f5698a81f309 Mon Sep 17 00:00:00 2001 From: Monty Date: Sun, 1 Feb 2015 15:24:22 +0200 Subject: Improve performance for calculating memory allocation Extend interface for 'show variables' with current scope --- sql/wsrep_thd.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sql/wsrep_thd.cc') diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index b65eead817d..2b4980ae05f 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -38,12 +38,13 @@ static volatile int32 wsrep_bf_aborts_counter(0); #define WSREP_ATOMIC_ADD_LONG my_atomic_add32 #endif -int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff) +int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff, + enum enum_var_type scope) { - wsrep_local_bf_aborts = WSREP_ATOMIC_LOAD_LONG(&wsrep_bf_aborts_counter); - var->type = SHOW_LONGLONG; - var->value = (char*)&wsrep_local_bf_aborts; - return 0; + wsrep_local_bf_aborts = WSREP_ATOMIC_LOAD_LONG(&wsrep_bf_aborts_counter); + var->type = SHOW_LONGLONG; + var->value = (char*)&wsrep_local_bf_aborts; + return 0; } /* must have (&thd->LOCK_wsrep_thd) */ -- cgit v1.2.1