Commit 318af3f3 authored by sjaakola's avatar sjaakola Committed by Jan Lindström

MW-369 FK fixes

Skipping wsrep extra FK checking for applier and replayer threads
parent f3c5928c
......@@ -2267,7 +2267,7 @@ row_upd_clust_rec_by_insert(
}
}
#ifdef WITH_WSREP
if (!referenced &&
if (wsrep_on(trx->mysql_thd) && !referenced &&
!(parent && que_node_get_type(parent) == QUE_NODE_UPDATE &&
((upd_node_t*)parent)->cascade_node == node) &&
foreign
......@@ -2532,10 +2532,11 @@ row_upd_del_mark_clust_rec(
node, pcur, index->table, index, offsets, thr, mtr);
}
#ifdef WITH_WSREP
if (err == DB_SUCCESS && !referenced &&
trx_t* trx = thr_get_trx(thr) ;
if (err == DB_SUCCESS && !referenced && trx && wsrep_on(trx->mysql_thd) &&
!(parent && que_node_get_type(parent) == QUE_NODE_UPDATE &&
((upd_node_t*)parent)->cascade_node == node) &&
thr_get_trx(thr) &&
foreign
) {
err = wsrep_row_upd_check_foreign_constraints(
......
......@@ -1984,7 +1984,9 @@ row_upd_sec_index_entry(
index, offsets, thr, &mtr);
}
#ifdef WITH_WSREP
if (err == DB_SUCCESS && !referenced &&
if (wsrep_on(trx->mysql_thd) &&
!wsrep_thd_is_BF(trx->mysql_thd, FALSE) &&
err == DB_SUCCESS && !referenced &&
!(parent && que_node_get_type(parent) ==
QUE_NODE_UPDATE &&
((upd_node_t*)parent)->cascade_node == node) &&
......@@ -2273,7 +2275,7 @@ row_upd_clust_rec_by_insert(
}
}
#ifdef WITH_WSREP
if (!referenced &&
if (wsrep_on(trx->mysql_thd) && !referenced &&
!(parent && que_node_get_type(parent) == QUE_NODE_UPDATE &&
((upd_node_t*)parent)->cascade_node == node) &&
foreign
......@@ -2541,10 +2543,11 @@ row_upd_del_mark_clust_rec(
node, pcur, index->table, index, offsets, thr, mtr);
}
#ifdef WITH_WSREP
if (err == DB_SUCCESS && !referenced &&
trx_t* trx = thr_get_trx(thr) ;
if (err == DB_SUCCESS && !referenced && trx && wsrep_on(trx->mysql_thd) &&
!(parent && que_node_get_type(parent) == QUE_NODE_UPDATE &&
((upd_node_t*)parent)->cascade_node == node) &&
thr_get_trx(thr) &&
foreign
) {
err = wsrep_row_upd_check_foreign_constraints(
......
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