Commit 66ec8adb authored by Sergey Vojtovich's avatar Sergey Vojtovich

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

dict_table_t::n_foreign_key_checks_running transition to
Atomic_counter.
parent edde1f6e
...@@ -1746,17 +1746,17 @@ struct dict_table_t { ...@@ -1746,17 +1746,17 @@ struct dict_table_t {
void inc_fk_checks() void inc_fk_checks()
{ {
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
lint fk_checks= (lint) int32_t fk_checks=
#endif #endif
my_atomic_addlint(&n_foreign_key_checks_running, 1); n_foreign_key_checks_running++;
ut_ad(fk_checks >= 0); ut_ad(fk_checks >= 0);
} }
void dec_fk_checks() void dec_fk_checks()
{ {
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
lint fk_checks= (lint) int32_t fk_checks=
#endif #endif
my_atomic_addlint(&n_foreign_key_checks_running, ulint(-1)); n_foreign_key_checks_running--;
ut_ad(fk_checks > 0); ut_ad(fk_checks > 0);
} }
...@@ -1935,7 +1935,7 @@ struct dict_table_t { ...@@ -1935,7 +1935,7 @@ struct dict_table_t {
/** Count of how many foreign key check operations are currently being /** Count of how many foreign key check operations are currently being
performed on the table. We cannot drop the table while there are performed on the table. We cannot drop the table while there are
foreign key checks running on it. */ 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 /** Transactions whose view low limit is greater than this number are
not allowed to store to the MySQL query cache or retrieve from it. not allowed to store to the MySQL query cache or retrieve from it.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment