diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-31 13:48:10 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-31 13:48:10 +0300 |
commit | 2e08b6d78c004471224e3ef0bd9e6c9bf56eff80 (patch) | |
tree | 974676231c948dd6f512508c1779a8a7afe6fbf1 /storage/innobase/row/row0upd.cc | |
parent | 4362ed1b6f7dcf84f5b34276fad0a5eb27222971 (diff) | |
download | mariadb-git-2e08b6d78c004471224e3ef0bd9e6c9bf56eff80.tar.gz |
MDEV-24258 preparation: Remove dict_sys.freeze() and unfreeze()
This will essentially make dict_sys.latch a mutex
(it is only acquired in exclusive mode).
The subsequent commit will merge dict_sys.mutex into dict_sys.latch
and reintroduce dict_sys.freeze() for those cases where we currently
acquire only dict_sys.latch but not dict_sys.mutex. The case where
both are acquired will be mapped to dict_sys.lock().
i_s_sys_tables_fill_table_stats(): Invoke dict_sys.prevent_eviction()
and the new function dict_sys.allow_eviction() to avoid table eviction
while a row in INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS is being
produced.
Reviewed by: Thirunarayanan Balathandayuthapani
Diffstat (limited to 'storage/innobase/row/row0upd.cc')
-rw-r--r-- | storage/innobase/row/row0upd.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index ee88ee7a4a6..db666cc5b28 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -162,7 +162,7 @@ wsrep_row_upd_index_is_foreign( /* No MDL protects dereferencing the members of table->foreign_set. */ const bool no_lock= !trx->dict_operation_lock_mode; if (no_lock) - dict_sys.freeze(); + dict_sys.mutex_lock(); auto end= table->foreign_set.end(); const bool is_referenced= end != @@ -170,7 +170,7 @@ wsrep_row_upd_index_is_foreign( [index](const dict_foreign_t* f) {return f->foreign_index == index;}); if (no_lock) - dict_sys.unfreeze(); + dict_sys.mutex_unlock(); return is_referenced; } |