summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2020-03-21 17:59:43 +0400
committerSergey Vojtovich <svoj@mariadb.org>2020-03-21 18:37:15 +0400
commit3b3f931570266487d9a9a2536514fe37b5297b37 (patch)
tree841ad8672a7e34830f7207c8a8c369cdd757bede /sql/handler.cc
parenta39d92ca574e275acaf4240629d4bee5f9ece3f6 (diff)
downloadmariadb-git-3b3f931570266487d9a9a2536514fe37b5297b37.tar.gz
Discovery counters: my_atomic to Atomic_counter
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 5f69a70d5e2..178830a87b1 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -440,9 +440,9 @@ static int ha_finish_errors(void)
return 0;
}
-static volatile int32 need_full_discover_for_existence= 0;
-static volatile int32 engines_with_discover_file_names= 0;
-static volatile int32 engines_with_discover= 0;
+static Atomic_counter<int32> need_full_discover_for_existence(0);
+static Atomic_counter<int32> engines_with_discover_file_names(0);
+static Atomic_counter<int32> engines_with_discover(0);
static int full_discover_for_existence(handlerton *, const char *, const char *)
{ return 0; }
@@ -464,13 +464,13 @@ static int hton_ext_based_table_discovery(handlerton *hton, LEX_CSTRING *db,
static void update_discovery_counters(handlerton *hton, int val)
{
if (hton->discover_table_existence == full_discover_for_existence)
- my_atomic_add32(&need_full_discover_for_existence, val);
+ need_full_discover_for_existence+= val;
if (hton->discover_table_names && hton->tablefile_extensions[0])
- my_atomic_add32(&engines_with_discover_file_names, val);
+ engines_with_discover_file_names+= val;
if (hton->discover_table)
- my_atomic_add32(&engines_with_discover, val);
+ engines_with_discover+= val;
}
int ha_finalize_handlerton(st_plugin_int *plugin)