Browse Source

MDEV-17441 - InnoDB transition to C++11 atomics

dict_table_t::n_foreign_key_checks_running transition to
Atomic_counter.
pull/1070/head
Sergey Vojtovich 7 years ago
parent
commit
66ec8adb77
  1. 10
      storage/innobase/include/dict0mem.h

10
storage/innobase/include/dict0mem.h

@ -1746,17 +1746,17 @@ struct dict_table_t {
void inc_fk_checks()
{
#ifdef UNIV_DEBUG
lint fk_checks= (lint)
int32_t fk_checks=
#endif
my_atomic_addlint(&n_foreign_key_checks_running, 1);
n_foreign_key_checks_running++;
ut_ad(fk_checks >= 0);
}
void dec_fk_checks()
{
#ifdef UNIV_DEBUG
lint fk_checks= (lint)
int32_t fk_checks=
#endif
my_atomic_addlint(&n_foreign_key_checks_running, ulint(-1));
n_foreign_key_checks_running--;
ut_ad(fk_checks > 0);
}
@ -1935,7 +1935,7 @@ public:
/** Count of how many foreign key check operations are currently being
performed on the table. We cannot drop the table while there are
foreign key checks running on it. */
ulint n_foreign_key_checks_running;
Atomic_counter<int32_t> n_foreign_key_checks_running;
/** Transactions whose view low limit is greater than this number are
not allowed to store to the MySQL query cache or retrieve from it.

Loading…
Cancel
Save