diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-11-09 12:27:54 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-11-09 12:27:54 +0200 |
commit | 27eaa963ff18d12939f798a78720d73cf6ce0b5d (patch) | |
tree | 0bca93e0e81c308a3497b7ff59b97d03202cb863 /storage/innobase/dict | |
parent | 320de65135c6dd1af7c2f34ac0469b80aaf3ddb6 (diff) | |
parent | e56c12b3cdf57ad29cee0ffe33bd6bc44c963789 (diff) | |
download | mariadb-git-27eaa963ff18d12939f798a78720d73cf6ce0b5d.tar.gz |
Merge 10.6 into 10.7
Diffstat (limited to 'storage/innobase/dict')
-rw-r--r-- | storage/innobase/dict/dict0dict.cc | 24 | ||||
-rw-r--r-- | storage/innobase/dict/drop.cc | 3 |
2 files changed, 8 insertions, 19 deletions
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 10ad82015ca..34362a6792f 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -685,8 +685,7 @@ dict_acquire_mdl_shared(dict_table_t *table, } else { - ut_ad(dict_sys.frozen()); - ut_ad(!dict_sys.locked()); + ut_ad(dict_sys.frozen_not_locked()); db_len= dict_get_db_name_len(table->name.m_name); } @@ -1003,7 +1002,7 @@ void dict_sys_t::lock_wait(SRW_LOCK_ARGS(const char *file, unsigned line)) latch_ex_wait_start.store(0, std::memory_order_relaxed); ut_ad(!latch_readers); ut_ad(!latch_ex); - ut_d(latch_ex= true); + ut_d(latch_ex= pthread_self()); return; } @@ -1021,15 +1020,15 @@ void dict_sys_t::lock_wait(SRW_LOCK_ARGS(const char *file, unsigned line)) latch.wr_lock(SRW_LOCK_ARGS(file, line)); ut_ad(!latch_readers); ut_ad(!latch_ex); - ut_d(latch_ex= true); + ut_d(latch_ex= pthread_self()); } #ifdef UNIV_PFS_RWLOCK ATTRIBUTE_NOINLINE void dict_sys_t::unlock() { - ut_ad(latch_ex); + ut_ad(latch_ex == pthread_self()); ut_ad(!latch_readers); - ut_d(latch_ex= false); + ut_d(latch_ex= 0); latch.wr_unlock(); } @@ -1498,6 +1497,7 @@ dict_table_t::rename_tablespace(span<const char> new_name, bool replace) const err= DB_TABLESPACE_EXISTS; else { + space->x_lock(); err= space->rename(path, true, replace); if (data_dir) { @@ -1505,6 +1505,7 @@ dict_table_t::rename_tablespace(span<const char> new_name, bool replace) const new_name= {name.m_name, strlen(name.m_name)}; RemoteDatafile::delete_link_file(new_name); } + space->x_unlock(); } ut_free(path); @@ -2757,17 +2758,6 @@ dict_index_build_internal_fts( } /*====================== FOREIGN KEY PROCESSING ========================*/ -/*********************************************************************//** -Checks if a table is referenced by foreign keys. -@return TRUE if table is referenced by a foreign key */ -ibool -dict_table_is_referenced_by_foreign_key( -/*====================================*/ - const dict_table_t* table) /*!< in: InnoDB table */ -{ - return(!table->referenced_set.empty()); -} - /**********************************************************************//** Removes a foreign constraint struct from the dictionary cache. */ void diff --git a/storage/innobase/dict/drop.cc b/storage/innobase/dict/drop.cc index edb6add0787..9013841ba5e 100644 --- a/storage/innobase/dict/drop.cc +++ b/storage/innobase/dict/drop.cc @@ -267,8 +267,7 @@ void trx_t::commit(std::vector<pfs_os_file_t> &deleted) if (btr_defragment_active) btr_defragment_remove_table(table); const fil_space_t *space= table->space; - ut_ad(!strstr(table->name.m_name, "/FTS_") || - purge_sys.must_wait_FTS()); + ut_ad(!p.second.is_aux_table() || purge_sys.must_wait_FTS()); dict_sys.remove(table); if (const auto id= space ? space->id : 0) { |