diff options
Diffstat (limited to 'storage/innobase/row/row0ins.cc')
-rw-r--r-- | storage/innobase/row/row0ins.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index 49bb5980548..9ea173494d9 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1294,7 +1294,7 @@ row_ins_foreign_check_on_constraint( row_mysql_freeze_data_dictionary(thr_get_trx(thr)); - mtr_start(mtr); + mtr_start_trx(mtr, trx); /* Restore pcur position */ @@ -1322,7 +1322,7 @@ nonstandard_exit_func: btr_pcur_store_position(pcur, mtr); mtr_commit(mtr); - mtr_start(mtr); + mtr_start_trx(mtr, trx); btr_pcur_restore_position(BTR_SEARCH_LEAF, pcur, mtr); @@ -1530,7 +1530,7 @@ run_again: } } - mtr_start(&mtr); + mtr_start_trx(&mtr, trx); /* Store old value on n_fields_cmp */ @@ -2331,7 +2331,7 @@ row_ins_clust_index_entry_low( || n_uniq == dict_index_get_n_unique(index)); ut_ad(!n_uniq || n_uniq == dict_index_get_n_unique(index)); - mtr_start(&mtr); + mtr_start_trx(&mtr, thr_get_trx(thr)); if (mode == BTR_MODIFY_LEAF && dict_index_is_online_ddl(index)) { mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED; @@ -2544,9 +2544,10 @@ Starts a mini-transaction and checks if the index will be dropped. @return true if the index is to be dropped */ static __attribute__((nonnull, warn_unused_result)) bool -row_ins_sec_mtr_start_and_check_if_aborted( +row_ins_sec_mtr_start_trx_and_check_if_aborted( /*=======================================*/ mtr_t* mtr, /*!< out: mini-transaction */ + trx_t* trx, /*!< in: transaction handle */ dict_index_t* index, /*!< in/out: secondary index */ bool check, /*!< in: whether to check */ ulint search_mode) @@ -2554,7 +2555,7 @@ row_ins_sec_mtr_start_and_check_if_aborted( { ut_ad(!dict_index_is_clust(index)); - mtr_start(mtr); + mtr_start_trx(mtr, trx); if (!check) { return(false); @@ -2612,13 +2613,14 @@ row_ins_sec_index_entry_low( ulint n_unique; mtr_t mtr; ulint* offsets = NULL; + trx_t* trx = thr_get_trx(thr); ut_ad(!dict_index_is_clust(index)); ut_ad(mode == BTR_MODIFY_LEAF || mode == BTR_MODIFY_TREE); cursor.thr = thr; ut_ad(thr_get_trx(thr)->id); - mtr_start(&mtr); + mtr_start_trx(&mtr, trx); /* Ensure that we acquire index->lock when inserting into an index with index->online_status == ONLINE_INDEX_COMPLETE, but @@ -2679,8 +2681,8 @@ row_ins_sec_index_entry_low( DEBUG_SYNC_C("row_ins_sec_index_unique"); - if (row_ins_sec_mtr_start_and_check_if_aborted( - &mtr, index, check, search_mode)) { + if (row_ins_sec_mtr_start_trx_and_check_if_aborted( + &mtr, trx, index, check, search_mode)) { goto func_exit; } @@ -2714,8 +2716,8 @@ row_ins_sec_index_entry_low( return(err); } - if (row_ins_sec_mtr_start_and_check_if_aborted( - &mtr, index, check, search_mode)) { + if (row_ins_sec_mtr_start_trx_and_check_if_aborted( + &mtr, trx, index, check, search_mode)) { goto func_exit; } |