diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-21 15:04:21 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-21 15:04:21 +0300 |
commit | 4db43972e17a6d00a941e253194c0a356054abba (patch) | |
tree | 7723c3548a453dc75bf7455b8b5c746628d9f6df | |
parent | 98003440c2f8d20164a191ced1b7d92b283bb68f (diff) | |
download | mariadb-git-4db43972e17a6d00a941e253194c0a356054abba.tar.gz |
MDEV-18115: Remove fil_type_is_data()
When commit 562c037b485b25f76fc7cb8e2c526d532450df7a
removed FIL_TYPE_LOG, the function fil_type_is_data()
became redundant, that is, always returning true for
a valid value of fil_space_t::purpose. Remove it.
-rw-r--r-- | storage/innobase/fil/fil0fil.cc | 11 | ||||
-rw-r--r-- | storage/innobase/include/fil0fil.h | 15 |
2 files changed, 2 insertions, 24 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 1617ee1f56f..715f819d723 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -2982,8 +2982,6 @@ fil_ibd_open( ut_ad(srv_log_file_size != 0); } - ut_ad(fil_type_is_data(purpose)); - /* Table flags can be ULINT_UNDEFINED if dict_tf_to_fsp_flags_failure is set. */ if (flags == ULINT_UNDEFINED) { @@ -4017,8 +4015,7 @@ fil_io( /* Open file if closed */ if (!fil_node_prepare_for_io(node, space)) { - if (fil_type_is_data(space->purpose) - && fil_is_user_tablespace_id(space->id)) { + if (fil_is_user_tablespace_id(space->id)) { mutex_exit(&fil_system.mutex); if (!ignore) { @@ -4044,11 +4041,7 @@ fil_io( ut_a(0); } - /* Check that at least the start offset is within the bounds of a - single-table tablespace, including rollback tablespaces. */ - if (node->size <= cur_page_no - && space->id != TRX_SYS_SPACE - && fil_type_is_data(space->purpose)) { + if (space->id && node->size <= cur_page_no) { if (ignore) { /* If we can tolerate the non-existent pages, we should return with DB_ERROR and let caller decide diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index 621b9130efc..531b70d1a40 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -60,21 +60,6 @@ enum fil_type_t { FIL_TYPE_TABLESPACE, }; -/** Check if fil_type is any of FIL_TYPE_TEMPORARY, FIL_TYPE_IMPORT -or FIL_TYPE_TABLESPACE. -@param[in] type variable of type fil_type_t -@return true if any of FIL_TYPE_TEMPORARY, FIL_TYPE_IMPORT -or FIL_TYPE_TABLESPACE */ -inline -bool -fil_type_is_data( - fil_type_t type) -{ - return(type == FIL_TYPE_TEMPORARY - || type == FIL_TYPE_IMPORT - || type == FIL_TYPE_TABLESPACE); -} - struct fil_node_t; #endif |