summaryrefslogtreecommitdiff
path: root/storage/innobase/dict/dict0crea.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-08-31 13:54:20 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-08-31 13:54:20 +0300
commit094de71742fbed4d49d38017d56f13100050c747 (patch)
tree32e10fe4ea999fb8e3ccdc18d0e47baeb8c461d6 /storage/innobase/dict/dict0crea.cc
parent6a2cd6f4b406cc3167799f589af1b96c4cd6943c (diff)
downloadmariadb-git-094de71742fbed4d49d38017d56f13100050c747.tar.gz
MDEV-25919 preparation: Various cleanup
que_eval_sql(): Remove the parameter lock_dict. The only caller with lock_dict=true was dict_stats_exec_sql(), which will now explicitly invoke dict_sys.lock() and dict_sys.unlock() by itself. row_import_cleanup(): Do not unnecessarily lock the dictionary. Concurrent access to the table during ALTER TABLE...IMPORT TABLESPACE is prevented by MDL and the fact that there cannot exist any undo log or change buffer records that would refer to the table or tablespace. row_import_for_mysql(): Do not unnecessarily lock the dictionary while accessing fil_system. Thanks to MDL_EXCLUSIVE that was acquired by the SQL layer, only one IMPORT may be in effect for the table name. row_quiesce_set_state(): Do not unnecessarily lock the dictionary. The dict_table_t::quiesce state is documented to be protected by all index latches, which we are acquiring. dict_table_close(): Introduce a simpler variant with fewer parameters. dict_table_close(): Reduce the amount of calls. We can simply invoke dict_table_t::release() on startup or in DDL operations, or when the table is inaccessible. In none of these cases, there is no need to invalidate the InnoDB persistent statistics. pars_info_t::graph_owns_us: Remove (unused). pars_info_free(): Define inline. fts_delete(), trx_t::evict_table(), row_prebuilt_free(), row_rename_table_for_mysql(): Simplify. row_mysql_lock_data_dictionary(): Remove some references; use dict_sys.lock() and dict_sys.unlock() instead. row_mysql_lock_table(): Remove. Use lock_table_for_trx() instead. ha_innobase::check_if_supported_inplace_alter(), row_create_table_for_mysql(): Simply assert dict_sys.sys_tables_exist(). In commit 49e2c8f0a6fefdeac50925f758090d6bd099768d and commit 1bd681c8b3c5213ce1f7976940a7dc38b48a0d39 srv_start() actually guarantees that the system tables will exist, or the server is in read-only mode, or startup will fail. Reviewed by: Thirunarayanan Balathandayuthapani
Diffstat (limited to 'storage/innobase/dict/dict0crea.cc')
-rw-r--r--storage/innobase/dict/dict0crea.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc
index c293ab302a3..eafc9bf7814 100644
--- a/storage/innobase/dict/dict0crea.cc
+++ b/storage/innobase/dict/dict0crea.cc
@@ -1403,7 +1403,7 @@ dberr_t dict_sys_t::create_or_check_sys_tables()
" ON SYS_FOREIGN (FOR_NAME);\n"
"CREATE INDEX REF_IND"
" ON SYS_FOREIGN (REF_NAME);\n"
- "END;\n", false, trx);
+ "END;\n", trx);
if (UNIV_UNLIKELY(error != DB_SUCCESS))
{
tablename= SYS_TABLE[SYS_FOREIGN].data();
@@ -1425,7 +1425,7 @@ err_exit:
" FOR_COL_NAME CHAR, REF_COL_NAME CHAR);\n"
"CREATE UNIQUE CLUSTERED INDEX ID_IND"
" ON SYS_FOREIGN_COLS (ID, POS);\n"
- "END;\n", false, trx);
+ "END;\n", trx);
if (UNIV_UNLIKELY(error != DB_SUCCESS))
{
tablename= SYS_TABLE[SYS_FOREIGN_COLS].data();
@@ -1440,7 +1440,7 @@ err_exit:
"SYS_VIRTUAL(TABLE_ID BIGINT,POS INT,BASE_POS INT);\n"
"CREATE UNIQUE CLUSTERED INDEX BASE_IDX"
" ON SYS_VIRTUAL(TABLE_ID, POS, BASE_POS);\n"
- "END;\n", false, trx);
+ "END;\n", trx);
if (UNIV_UNLIKELY(error != DB_SUCCESS))
{
tablename= SYS_TABLE[SYS_VIRTUAL].data();
@@ -1504,7 +1504,7 @@ dict_foreign_eval_sql(
dberr_t error;
FILE* ef = dict_foreign_err_file;
- error = que_eval_sql(info, sql, FALSE, trx);
+ error = que_eval_sql(info, sql, trx);
if (error == DB_DUPLICATE_KEY) {
mysql_mutex_lock(&dict_foreign_err_mutex);