diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-09 14:08:49 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-10 07:56:55 +0300 |
commit | 5b3f7c0c33e74426d5d22db1ac159ddead79cbc1 (patch) | |
tree | 4ad8610a5cb6ae8424ff7b27d83aec9e5daf89bd /storage/innobase/include | |
parent | 06442e3e9f7819a982eb7a4dc865be02c556ab06 (diff) | |
download | mariadb-git-5b3f7c0c33e74426d5d22db1ac159ddead79cbc1.tar.gz |
MDEV-18220: Remove some redundant data structures
fts_state_t, fts_slot_t::state: Remove. Replaced by fts_slot_t::running
and fts_slot_t::table_id as follows.
FTS_STATE_SUSPENDED: Removed (unused).
FTS_STATE_EMPTY: Removed. table_id=0 will denote empty slots.
FTS_STATE_RUNNING: Equivalent to running=true.
FTS_STATE_LOADED, FTS_STATE_DONE: Equivalent to running=false.
fts_slot_t::table: Remove. Tables will be identified by table_id.
After opening a table, we will check fil_table_accessible() before
accessing the data.
fts_optimize_new_table(), fts_optimize_del_table(),
fts_optimize_how_many(), fts_is_sync_needed():
Remove the parameter tables, and use the static variable fts_slots
(which was introduced in MariaDB 10.2) instead.
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/fil0fil.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index 79a598b3612..1549d67ce71 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2018, MariaDB Corporation. +Copyright (c) 2013, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -843,6 +843,18 @@ fil_op_log_parse_or_replay( only be parsed but not replayed */ ulint log_flags); /*!< in: redo log flags (stored in the page number parameter) */ + +/** Determine whether a table can be accessed in operations that are +not (necessarily) protected by meta-data locks. +(Rollback would generally be protected, but rollback of +FOREIGN KEY CASCADE/SET NULL is not protected by meta-data locks +but only by InnoDB table locks, which may be broken by +lock_remove_all_on_table().) +@param[in] table persistent table +checked @return whether the table is accessible */ +UNIV_INTERN bool fil_table_accessible(const dict_table_t* table) + MY_ATTRIBUTE((warn_unused_result, nonnull)); + /** Delete a tablespace and associated .ibd file. @param[in] id tablespace identifier @param[in] drop_ahi whether to drop the adaptive hash index |