summaryrefslogtreecommitdiff
path: root/storage/innobase/row
diff options
context:
space:
mode:
authorsjaakola <seppo.jaakola@iki.fi>2017-04-27 20:28:22 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2017-07-20 13:51:05 +0300
commit48b7245bf285b757aa46bd37c86b9c202705e3bb (patch)
tree1cd7fa5afbc848b30d7576edeb92d060a3e370c8 /storage/innobase/row
parenta4bc8db216b4dd61ca0b1cb5a8b7806437416dc7 (diff)
downloadmariadb-git-48b7245bf285b757aa46bd37c86b9c202705e3bb.tar.gz
MW-369 - merged fix for FK issue from 5.6-v25 branch
Signed-off-by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'storage/innobase/row')
-rw-r--r--storage/innobase/row/row0ins.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/storage/innobase/row/row0ins.c b/storage/innobase/row/row0ins.c
index c380390d62a..3726c517ff0 100644
--- a/storage/innobase/row/row0ins.c
+++ b/storage/innobase/row/row0ins.c
@@ -1082,11 +1082,12 @@ row_ins_foreign_check_on_constraint(
#ifdef WITH_WSREP
err = wsrep_append_foreign_key(
- thr_get_trx(thr),
- foreign,
- clust_rec,
- clust_index,
- FALSE, FALSE);
+ thr_get_trx(thr),
+ foreign,
+ clust_rec,
+ clust_index,
+ FALSE,
+ (node) ? TRUE : FALSE);
if (err != DB_SUCCESS) {
fprintf(stderr,
"WSREP: foreign key append failed: %lu\n", err);
@@ -1247,6 +1248,9 @@ row_ins_check_foreign_constraint(
ulint* offsets = offsets_;
rec_offs_init(offsets_);
+#ifdef WITH_WSREP
+ upd_node= NULL;
+#endif /* WITH_WSREP */
run_again:
#ifdef UNIV_SYNC_DEBUG
ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_SHARED));
@@ -1429,9 +1433,10 @@ run_again:
err = wsrep_append_foreign_key(
thr_get_trx(thr),
foreign,
- rec,
- check_index,
- check_ref, TRUE);
+ rec,
+ check_index,
+ check_ref,
+ (upd_node) ? TRUE : FALSE);
#endif /* WITH_WSREP */
goto end_scan;
} else if (foreign->type != 0) {