Skip to content

Commit 66ec8ad

Browse files
committed
MDEV-17441 - InnoDB transition to C++11 atomics
dict_table_t::n_foreign_key_checks_running transition to Atomic_counter.
1 parent edde1f6 commit 66ec8ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

storage/innobase/include/dict0mem.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,17 +1746,17 @@ struct dict_table_t {
17461746
void inc_fk_checks()
17471747
{
17481748
#ifdef UNIV_DEBUG
1749-
lint fk_checks= (lint)
1749+
int32_t fk_checks=
17501750
#endif
1751-
my_atomic_addlint(&n_foreign_key_checks_running, 1);
1751+
n_foreign_key_checks_running++;
17521752
ut_ad(fk_checks >= 0);
17531753
}
17541754
void dec_fk_checks()
17551755
{
17561756
#ifdef UNIV_DEBUG
1757-
lint fk_checks= (lint)
1757+
int32_t fk_checks=
17581758
#endif
1759-
my_atomic_addlint(&n_foreign_key_checks_running, ulint(-1));
1759+
n_foreign_key_checks_running--;
17601760
ut_ad(fk_checks > 0);
17611761
}
17621762

@@ -1935,7 +1935,7 @@ struct dict_table_t {
19351935
/** Count of how many foreign key check operations are currently being
19361936
performed on the table. We cannot drop the table while there are
19371937
foreign key checks running on it. */
1938-
ulint n_foreign_key_checks_running;
1938+
Atomic_counter<int32_t> n_foreign_key_checks_running;
19391939

19401940
/** Transactions whose view low limit is greater than this number are
19411941
not allowed to store to the MySQL query cache or retrieve from it.

0 commit comments

Comments
 (0)