summaryrefslogtreecommitdiff
path: root/storage/innobase/fil/fil0fil.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/fil/fil0fil.cc')
-rw-r--r--storage/innobase/fil/fil0fil.cc114
1 files changed, 0 insertions, 114 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index 57303a25300..d47e9f3f5bf 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -4914,120 +4914,6 @@ test_make_filepath()
#endif /* UNIV_ENABLE_UNIT_TEST_MAKE_FILEPATH */
/* @} */
-/** Return the next fil_space_t.
-Once started, the caller must keep calling this until it returns NULL.
-fil_space_t::acquire() and fil_space_t::release() are invoked here which
-blocks a concurrent operation from dropping the tablespace.
-@param[in] prev_space Pointer to the previous fil_space_t.
-If NULL, use the first fil_space_t on fil_system.space_list.
-@return pointer to the next fil_space_t.
-@retval NULL if this was the last*/
-fil_space_t*
-fil_space_next(fil_space_t* prev_space)
-{
- fil_space_t* space=prev_space;
-
- mutex_enter(&fil_system.mutex);
-
- if (!space) {
- space = UT_LIST_GET_FIRST(fil_system.space_list);
- } else {
- ut_a(space->referenced());
-
- /* Move on to the next fil_space_t */
- space->release();
- space = UT_LIST_GET_NEXT(space_list, space);
- }
-
- /* Skip spaces that are being created by
- fil_ibd_create(), or dropped, or !tablespace. */
- while (space != NULL
- && (UT_LIST_GET_LEN(space->chain) == 0
- || space->is_stopping()
- || space->purpose != FIL_TYPE_TABLESPACE)) {
- space = UT_LIST_GET_NEXT(space_list, space);
- }
-
- if (space != NULL) {
- space->acquire();
- }
-
- mutex_exit(&fil_system.mutex);
-
- return(space);
-}
-
-/**
-Remove space from key rotation list if there are no more
-pending operations.
-@param[in,out] space Tablespace */
-static
-void
-fil_space_remove_from_keyrotation(fil_space_t* space)
-{
- ut_ad(mutex_own(&fil_system.mutex));
- ut_ad(space);
-
- if (!space->referenced() && space->is_in_rotation_list) {
- space->is_in_rotation_list = false;
- ut_a(!fil_system.rotation_list.empty());
- fil_system.rotation_list.remove(*space);
- }
-}
-
-
-/** Return the next fil_space_t from key rotation list.
-Once started, the caller must keep calling this until it returns NULL.
-fil_space_t::acquire() and fil_space_t::release() are invoked here which
-blocks a concurrent operation from dropping the tablespace.
-@param[in] prev_space Pointer to the previous fil_space_t.
-If NULL, use the first fil_space_t on fil_system.space_list.
-@param[in] recheck recheck of the tablespace is needed or
- still encryption thread does write page0 for it
-@param[in] key_version key version of the key state thread
-@return pointer to the next fil_space_t.
-@retval NULL if this was the last */
-fil_space_t *fil_system_t::keyrotate_next(fil_space_t *prev_space,
- bool recheck, uint key_version)
-{
- mutex_enter(&fil_system.mutex);
-
- /* If one of the encryption threads already started the encryption
- of the table then don't remove the unencrypted spaces from rotation list
-
- If there is a change in innodb_encrypt_tables variables value then
- don't remove the last processed tablespace from the rotation list. */
- const bool remove= (!recheck || prev_space->crypt_data) &&
- !key_version == !srv_encrypt_tables;
- sized_ilist<fil_space_t, rotation_list_tag_t>::iterator it=
- prev_space ? prev_space : fil_system.rotation_list.end();
-
- if (it == fil_system.rotation_list.end())
- it= fil_system.rotation_list.begin();
- else
- {
- /* Move on to the next fil_space_t */
- prev_space->release();
-
- ++it;
-
- while (it != fil_system.rotation_list.end() &&
- (UT_LIST_GET_LEN(it->chain) == 0 || it->is_stopping()))
- ++it;
-
- if (remove)
- fil_space_remove_from_keyrotation(prev_space);
- }
-
- fil_space_t *space= it == fil_system.rotation_list.end() ? NULL : &*it;
-
- if (space)
- space->acquire();
-
- mutex_exit(&fil_system.mutex);
- return space;
-}
-
/** Determine the block size of the data file.
@param[in] space tablespace
@param[in] offset page number