summaryrefslogtreecommitdiff
path: root/storage/xtradb/row/row0upd.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-08-12 16:39:10 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-08-12 16:39:10 -0400
commit305c1ae157de414bbd3e4a89cddbe522eaa1a309 (patch)
tree12e46d8bc993dfbb793bae746d507dda261e5b34 /storage/xtradb/row/row0upd.cc
parent8ec02bb836ab43d115579e6ba14f669e7dcd3e82 (diff)
downloadmariadb-git-305c1ae157de414bbd3e4a89cddbe522eaa1a309.tar.gz
Merge of innobase changes to xtradb. (r3871..3873).
Diffstat (limited to 'storage/xtradb/row/row0upd.cc')
-rw-r--r--storage/xtradb/row/row0upd.cc21
1 files changed, 6 insertions, 15 deletions
diff --git a/storage/xtradb/row/row0upd.cc b/storage/xtradb/row/row0upd.cc
index 4b8dff7b47f..bdd2a691368 100644
--- a/storage/xtradb/row/row0upd.cc
+++ b/storage/xtradb/row/row0upd.cc
@@ -419,12 +419,9 @@ wsrep_row_upd_check_foreign_constraints(
}
if (foreign->referenced_table) {
- mutex_enter(&(dict_sys->mutex));
-
- (foreign->referenced_table
- ->n_foreign_key_checks_running)++;
-
- mutex_exit(&(dict_sys->mutex));
+ os_inc_counter(dict_sys->mutex,
+ foreign->referenced_table
+ ->n_foreign_key_checks_running);
}
/* NOTE that if the thread ends up waiting for a lock
@@ -436,20 +433,14 @@ wsrep_row_upd_check_foreign_constraints(
TRUE, foreign, table, entry, thr);
if (foreign->referenced_table) {
- mutex_enter(&(dict_sys->mutex));
-
- ut_a(foreign->referenced_table
- ->n_foreign_key_checks_running > 0);
-
- (foreign->referenced_table
- ->n_foreign_key_checks_running)--;
+ os_dec_counter(dict_sys->mutex,
+ foreign->referenced_table
+ ->n_foreign_key_checks_running);
if (opened == TRUE) {
dict_table_close(foreign->referenced_table, TRUE, FALSE);
opened = FALSE;
}
-
- mutex_exit(&(dict_sys->mutex));
}
if (err != DB_SUCCESS) {