Skip to content
Permalink
Browse files
MDEV-17441 - InnoDB transition to C++11 atomics
dict_table_t::n_foreign_key_checks_running transition to
Atomic_counter.
  • Loading branch information
Sergey Vojtovich committed Dec 27, 2018
1 parent edde1f6 commit 66ec8ad
Showing 1 changed file with 5 additions and 5 deletions.
@@ -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 @@ struct dict_table_t {
/** 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.

0 comments on commit 66ec8ad

Please sign in to comment.