diff options
Diffstat (limited to 'storage/innobase/row')
-rw-r--r-- | storage/innobase/row/row0ins.cc | 10 | ||||
-rw-r--r-- | storage/innobase/row/row0purge.cc | 24 | ||||
-rw-r--r-- | storage/innobase/row/row0uins.cc | 6 | ||||
-rw-r--r-- | storage/innobase/row/row0umod.cc | 14 | ||||
-rw-r--r-- | storage/innobase/row/row0upd.cc | 4 |
5 files changed, 29 insertions, 29 deletions
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index b4b767df3e4..42bc482ff56 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -2622,7 +2622,7 @@ row_ins_clust_index_entry_low( if (mode == BTR_MODIFY_LEAF && dict_index_is_online_ddl(index)) { mode = BTR_MODIFY_LEAF_ALREADY_S_LATCHED; - mtr_s_lock(dict_index_get_lock(index), &mtr); + mtr_s_lock_index(index, &mtr); } if (unsigned ai = index->table->persistent_autoinc) { @@ -2847,9 +2847,9 @@ row_ins_sec_mtr_start_and_check_if_aborted( } if (search_mode & BTR_ALREADY_S_LATCHED) { - mtr_s_lock(dict_index_get_lock(index), mtr); + mtr_s_lock_index(index, mtr); } else { - mtr_sx_lock(dict_index_get_lock(index), mtr); + mtr_sx_lock_index(index, mtr); } switch (index->online_status) { @@ -2935,9 +2935,9 @@ row_ins_sec_index_entry_low( DEBUG_SYNC_C("row_ins_sec_index_enter"); if (mode == BTR_MODIFY_LEAF) { search_mode |= BTR_ALREADY_S_LATCHED; - mtr_s_lock(dict_index_get_lock(index), &mtr); + mtr_s_lock_index(index, &mtr); } else { - mtr_sx_lock(dict_index_get_lock(index), &mtr); + mtr_sx_lock_index(index, &mtr); } if (row_log_online_op_try( diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index 8a6bd674126..4dee8de5aad 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -388,14 +388,14 @@ row_purge_remove_sec_if_poss_tree( enum row_search_result search_result; log_free_check(); - mtr_start(&mtr); + mtr.start(); index->set_modified(mtr); if (!index->is_committed()) { /* The index->online_status may change if the index is or was being created online, but not committed yet. It is protected by index->lock. */ - mtr_sx_lock(dict_index_get_lock(index), &mtr); + mtr_sx_lock_index(index, &mtr); if (dict_index_is_online_ddl(index)) { /* Online secondary index creation will not @@ -490,9 +490,9 @@ row_purge_remove_sec_if_poss_tree( } func_exit: - btr_pcur_close(&pcur); + btr_pcur_close(&pcur); // FIXME: need this? func_exit_no_pcur: - mtr_commit(&mtr); + mtr.commit(); return(success); } @@ -519,7 +519,7 @@ row_purge_remove_sec_if_poss_leaf( log_free_check(); ut_ad(index->table == node->table); ut_ad(!index->table->is_temporary()); - mtr_start(&mtr); + mtr.start(); index->set_modified(mtr); if (!index->is_committed()) { @@ -531,7 +531,7 @@ row_purge_remove_sec_if_poss_leaf( /* The index->online_status may change if the the index is or was being created online, but not committed yet. It is protected by index->lock. */ - mtr_s_lock(dict_index_get_lock(index), &mtr); + mtr_s_lock_index(index, &mtr); if (dict_index_is_online_ddl(index)) { /* Online secondary index creation will not @@ -635,7 +635,7 @@ row_purge_remove_sec_if_poss_leaf( ->page.id); btr_pcur_close(&pcur); - mtr_commit(&mtr); + mtr.commit(); return(success); } } @@ -661,9 +661,9 @@ row_purge_remove_sec_if_poss_leaf( /* The deletion was buffered. */ case ROW_NOT_FOUND: /* The index entry does not exist, nothing to do. */ - btr_pcur_close(&pcur); + btr_pcur_close(&pcur); // FIXME: do we need these? when is btr_cur->rtr_info set? func_exit_no_pcur: - mtr_commit(&mtr); + mtr.commit(); return(success); } @@ -954,12 +954,12 @@ skip_secondaries: ut_ad(rseg->id == rseg_id); ut_ad(rseg->is_persistent()); - mtr_start(&mtr); + mtr.start(); /* We have to acquire an SX-latch to the clustered index tree (exclude other tree changes) */ - mtr_sx_lock(dict_index_get_lock(index), &mtr); + mtr_sx_lock_index(index, &mtr); index->set_modified(mtr); @@ -990,7 +990,7 @@ skip_secondaries: data_field + dfield_get_len(&ufield->new_val) - BTR_EXTERN_FIELD_REF_SIZE, NULL, NULL, NULL, 0, false, &mtr); - mtr_commit(&mtr); + mtr.commit(); } } diff --git a/storage/innobase/row/row0uins.cc b/storage/innobase/row/row0uins.cc index becca3600dc..70f89d9115d 100644 --- a/storage/innobase/row/row0uins.cc +++ b/storage/innobase/row/row0uins.cc @@ -91,7 +91,7 @@ row_undo_ins_remove_clust_rec( != RW_X_LATCH); ut_ad(node->table->id != DICT_INDEXES_ID); ut_ad(node->table->id != DICT_COLUMNS_ID); - mtr_s_lock(dict_index_get_lock(index), &mtr); + mtr_s_lock_index(index, &mtr); } } @@ -257,10 +257,10 @@ row_undo_ins_remove_sec_low( if (modify_leaf) { mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED; - mtr_s_lock(dict_index_get_lock(index), &mtr); + mtr_s_lock_index(index, &mtr); } else { ut_ad(mode == (BTR_MODIFY_TREE | BTR_LATCH_FOR_DELETE)); - mtr_sx_lock(dict_index_get_lock(index), &mtr); + mtr_sx_lock_index(index, &mtr); } if (row_log_online_op_try(index, entry, 0)) { diff --git a/storage/innobase/row/row0umod.cc b/storage/innobase/row/row0umod.cc index 9820fc3b06e..4775dc12348 100644 --- a/storage/innobase/row/row0umod.cc +++ b/storage/innobase/row/row0umod.cc @@ -237,7 +237,7 @@ static bool row_undo_mod_must_purge(undo_node_t* node, mtr_t* mtr) btr_cur_t* btr_cur = btr_pcur_get_btr_cur(&node->pcur); ut_ad(btr_cur->index->is_primary()); - mtr_s_lock(&purge_sys.latch, mtr); + mtr->s_lock(&purge_sys.latch, __FILE__, __LINE__); if (!purge_sys.view.changes_visible(node->new_trx_id, node->table->name)) { @@ -288,7 +288,7 @@ row_undo_mod_clust( online = dict_index_is_online_ddl(index); if (online) { ut_ad(node->trx->dict_operation_lock_mode != RW_X_LATCH); - mtr_s_lock(dict_index_get_lock(index), &mtr); + mtr_s_lock_index(index, &mtr); } mem_heap_t* heap = mem_heap_create(1024); @@ -443,7 +443,7 @@ row_undo_mod_clust( goto mtr_commit_exit; } rec_t* rec = btr_pcur_get_rec(pcur); - mtr_s_lock(&purge_sys.latch, &mtr); + mtr.s_lock(&purge_sys.latch, __FILE__, __LINE__); if (!purge_sys.view.changes_visible(node->new_trx_id, node->table->name)) { goto mtr_commit_exit; @@ -536,10 +536,10 @@ row_undo_mod_del_mark_or_remove_sec_low( is protected by index->lock. */ if (modify_leaf) { mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED; - mtr_s_lock(dict_index_get_lock(index), &mtr); + mtr_s_lock_index(index, &mtr); } else { ut_ad(mode == (BTR_MODIFY_TREE | BTR_LATCH_FOR_DELETE)); - mtr_sx_lock(dict_index_get_lock(index), &mtr); + mtr_sx_lock_index(index, &mtr); } if (row_log_online_op_try(index, entry, 0)) { @@ -732,10 +732,10 @@ try_again: is protected by index->lock. */ if (mode == BTR_MODIFY_LEAF) { mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED; - mtr_s_lock(dict_index_get_lock(index), &mtr); + mtr_s_lock_index(index, &mtr); } else { ut_ad(mode == BTR_MODIFY_TREE); - mtr_sx_lock(dict_index_get_lock(index), &mtr); + mtr_sx_lock_index(index, &mtr); } if (row_log_online_op_try(index, entry, trx->id)) { diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index a3279a3c87b..bc072ccffc9 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2321,7 +2321,7 @@ row_upd_sec_index_entry( or was being created online, but not committed yet. It is protected by index->lock. */ - mtr_s_lock(dict_index_get_lock(index), &mtr); + mtr_s_lock_index(index, &mtr); switch (dict_index_get_online_status(index)) { case ONLINE_INDEX_COMPLETE: @@ -3100,7 +3100,7 @@ row_upd_clust_step( if (dict_index_is_online_ddl(index)) { ut_ad(node->table->id != DICT_INDEXES_ID); mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED; - mtr_s_lock(dict_index_get_lock(index), &mtr); + mtr_s_lock_index(index, &mtr); } else { mode = BTR_MODIFY_LEAF; } |