diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-13 18:26:59 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-13 18:46:12 +0300 |
commit | b93ecea65cc33969cf561b941f00a7ac10d3e29a (patch) | |
tree | 895c644e7e1aeccfe04f6c186881e7d742e2cc87 /storage/innobase/row/row0merge.cc | |
parent | 26a14ee1308df65ebb9dda9a8618e64f2f2fc518 (diff) | |
download | mariadb-git-b93ecea65cc33969cf561b941f00a7ac10d3e29a.tar.gz |
Remove unnecessary pointer indirection for rw_lock_t
In MySQL 5.7.8 an extra level of pointer indirection was added to
dict_operation_lock and some other rw_lock_t without solid justification,
in mysql/mysql-server@52720f1772f9f424bf3dd62fa9c214dd608cd036.
Let us revert that change and remove the rather useless rw_lock_t
constructor and destructor and the magic_n field. In this way,
some unnecessary pointer dereferences and heap allocation will be avoided
and debugging might be a little easier.
Diffstat (limited to 'storage/innobase/row/row0merge.cc')
-rw-r--r-- | storage/innobase/row/row0merge.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index dc4c8b72785..3dd7ba233b2 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -3614,7 +3614,7 @@ row_merge_drop_index_dict( ut_ad(mutex_own(&dict_sys->mutex)); ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX); - ut_ad(rw_lock_own(dict_operation_lock, RW_LOCK_X)); + ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X)); info = pars_info_create(); pars_info_add_ull_literal(info, "indexid", index_id); @@ -3677,7 +3677,7 @@ row_merge_drop_indexes_dict( ut_ad(mutex_own(&dict_sys->mutex)); ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX); - ut_ad(rw_lock_own(dict_operation_lock, RW_LOCK_X)); + ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X)); /* It is possible that table->n_ref_count > 1 when locked=TRUE. In this case, all code that should have an open @@ -3727,7 +3727,7 @@ row_merge_drop_indexes( ut_ad(mutex_own(&dict_sys->mutex)); ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); ut_ad(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX); - ut_ad(rw_lock_own(dict_operation_lock, RW_LOCK_X)); + ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X)); index = dict_table_get_first_index(table); ut_ad(dict_index_is_clust(index)); |