diff options
Diffstat (limited to 'storage/innobase/row')
-rw-r--r-- | storage/innobase/row/row0ins.c | 22 | ||||
-rw-r--r-- | storage/innobase/row/row0upd.c | 6 |
2 files changed, 6 insertions, 22 deletions
diff --git a/storage/innobase/row/row0ins.c b/storage/innobase/row/row0ins.c index 758a1ed5189..67cc68738a9 100644 --- a/storage/innobase/row/row0ins.c +++ b/storage/innobase/row/row0ins.c @@ -1682,9 +1682,6 @@ row_ins_scan_sec_index_for_duplicate( dtuple_t* entry, /*!< in: index entry */ que_thr_t* thr) /*!< in: query thread */ { -#ifdef WITH_WSREP - trx_t* trx = thr_get_trx(thr); -#endif ulint n_unique; ulint i; int cmp; @@ -1748,15 +1745,8 @@ row_ins_scan_sec_index_for_duplicate( } else { lock_type = LOCK_ORDINARY; } -#ifdef WITH_WSREP - /* slave applier must not get duplicate error */ - if (allow_duplicates || - (wsrep_on(trx->mysql_thd) && - wsrep_thd_is_brute_force(trx->mysql_thd))) { -#else if (allow_duplicates) { -#endif /* If the SQL-query will update or replace duplicate key we will take X-lock for @@ -1872,13 +1862,7 @@ row_ins_duplicate_error_in_clust( sure that in roll-forward we get the same duplicate errors as in original execution */ -#ifdef WITH_WSREP - if (trx->duplicates || - (wsrep_on(trx->mysql_thd) && - wsrep_thd_is_brute_force(trx->mysql_thd))) { -#else if (trx->duplicates) { -#endif /* If the SQL-query will update or replace duplicate key we will take X-lock for @@ -1922,13 +1906,7 @@ row_ins_duplicate_error_in_clust( offsets = rec_get_offsets(rec, cursor->index, offsets, ULINT_UNDEFINED, &heap); -#ifdef WITH_WSREP - if (trx->duplicates || - (wsrep_on(trx->mysql_thd) && - wsrep_thd_is_brute_force(trx->mysql_thd))) { -#else if (trx->duplicates) { -#endif /* If the SQL-query will update or replace duplicate key we will take X-lock for diff --git a/storage/innobase/row/row0upd.c b/storage/innobase/row/row0upd.c index 186be33d2bd..bcb5837198b 100644 --- a/storage/innobase/row/row0upd.c +++ b/storage/innobase/row/row0upd.c @@ -370,6 +370,12 @@ wsrep_row_upd_check_foreign_constraints( } trx = thr_get_trx(thr); + if (wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { + + return(DB_SUCCESS); + } + + /* TODO: make native slave thread bail out here */ rec = btr_pcur_get_rec(pcur); ut_ad(rec_offs_validate(rec, index, offsets)); |