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/srv | |
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/srv')
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 3d7e3e3814c..a6ada6067fd 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -2066,7 +2066,7 @@ srv_master_evict_from_table_cache( { ulint n_tables_evicted = 0; - rw_lock_x_lock(dict_operation_lock); + rw_lock_x_lock(&dict_operation_lock); dict_mutex_enter_for_mysql(); @@ -2075,7 +2075,7 @@ srv_master_evict_from_table_cache( dict_mutex_exit_for_mysql(); - rw_lock_x_unlock(dict_operation_lock); + rw_lock_x_unlock(&dict_operation_lock); return(n_tables_evicted); } |