Skip to content

Commit 3b3f931

Browse files
committed
Discovery counters: my_atomic to Atomic_counter
1 parent a39d92c commit 3b3f931

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sql/handler.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,9 @@ static int ha_finish_errors(void)
440440
return 0;
441441
}
442442

443-
static volatile int32 need_full_discover_for_existence= 0;
444-
static volatile int32 engines_with_discover_file_names= 0;
445-
static volatile int32 engines_with_discover= 0;
443+
static Atomic_counter<int32> need_full_discover_for_existence(0);
444+
static Atomic_counter<int32> engines_with_discover_file_names(0);
445+
static Atomic_counter<int32> engines_with_discover(0);
446446

447447
static int full_discover_for_existence(handlerton *, const char *, const char *)
448448
{ return 0; }
@@ -464,13 +464,13 @@ static int hton_ext_based_table_discovery(handlerton *hton, LEX_CSTRING *db,
464464
static void update_discovery_counters(handlerton *hton, int val)
465465
{
466466
if (hton->discover_table_existence == full_discover_for_existence)
467-
my_atomic_add32(&need_full_discover_for_existence, val);
467+
need_full_discover_for_existence+= val;
468468

469469
if (hton->discover_table_names && hton->tablefile_extensions[0])
470-
my_atomic_add32(&engines_with_discover_file_names, val);
470+
engines_with_discover_file_names+= val;
471471

472472
if (hton->discover_table)
473-
my_atomic_add32(&engines_with_discover, val);
473+
engines_with_discover+= val;
474474
}
475475

476476
int ha_finalize_handlerton(st_plugin_int *plugin)

0 commit comments

Comments
 (0)