diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-09-13 11:55:14 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-09-13 11:55:14 +0300 |
commit | f6717c4af66c9a295c789dc30091cac6dc719350 (patch) | |
tree | 45ecc0f88efe529100f6869859189ad138556ea8 | |
parent | 329d370f2d6af13cee89bc2c8db0f5915dcbfd4a (diff) | |
download | mariadb-git-f6717c4af66c9a295c789dc30091cac6dc719350.tar.gz |
MDEV-24258 fixup: Do not update dict_table_t::n_ref_count
row_purge_remove_clust_if_poss_low(): The table identified by
SYS_INDEXES.TABLE_ID is protected by exclusive dict_sys.latch.
There is no need to touch its reference count.
-rw-r--r-- | storage/innobase/row/row0purge.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index 29ceb0dabc1..d59e7760bba 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -115,8 +115,7 @@ row_purge_remove_clust_if_poss_low( retry: purge_sys.check_stop_FTS(); dict_sys.lock(SRW_LOCK_CALL); - table = dict_table_open_on_id( - table_id, true, DICT_TABLE_OP_OPEN_ONLY_IF_CACHED); + table = dict_sys.find_table(table_id); if (!table) { dict_sys.unlock(); } else if (table->n_rec_locks) { @@ -141,7 +140,6 @@ removed: mtr.commit(); close_and_exit: if (table) { - dict_table_close(table, true); dict_sys.unlock(); } return success; @@ -166,7 +164,7 @@ close_and_exit: if (const uint32_t space_id = dict_drop_index_tree( &node->pcur, nullptr, &mtr)) { if (table) { - if (table->release()) { + if (table->get_ref_count() == 0) { dict_sys.remove(table); } else if (table->space_id == space_id) { table->space = nullptr; @@ -181,7 +179,6 @@ close_and_exit: mtr.commit(); if (table) { - dict_table_close(table, true); dict_sys.unlock(); table = nullptr; } |