Skip to content
Permalink
Browse files
Cleanup: Remove fil_space_get_flags()
Replace fil_space_get_flags(space) == ULINT_UNDEFINED
with the functionally equivalent fil_space_get_size(space) == 0.
  • Loading branch information
dr-m committed Dec 18, 2019
1 parent fb4a897 commit 44be865
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 43 deletions.
@@ -1469,37 +1469,6 @@ fil_space_get_size(
return(size);
}

/*******************************************************************//**
Returns the flags of the space. The tablespace must be cached
in the memory cache.
@return flags, ULINT_UNDEFINED if space not found */
ulint
fil_space_get_flags(
/*================*/
ulint id) /*!< in: space id */
{
fil_space_t* space;
ulint flags;

ut_ad(fil_system.is_initialised());

mutex_enter(&fil_system.mutex);

space = fil_space_get_space(id);

if (space == NULL) {
mutex_exit(&fil_system.mutex);

return(ULINT_UNDEFINED);
}

flags = space->flags;

mutex_exit(&fil_system.mutex);

return(flags);
}

/** Open each file. Only invoked on fil_system.temp_space.
@return whether all files were opened */
bool fil_space_t::open()
@@ -1073,14 +1073,6 @@ ulint
fil_space_get_size(
/*===============*/
ulint id); /*!< in: space id */
/*******************************************************************//**
Returns the flags of the space. The tablespace must be cached
in the memory cache.
@return flags, ULINT_UNDEFINED if space not found */
ulint
fil_space_get_flags(
/*================*/
ulint id); /*!< in: space id */

/*******************************************************************//**
Opens all log files and system tablespace data files. They stay open until the
@@ -2633,8 +2633,7 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
case STORE_NO:
break;
case STORE_IF_EXISTS:
if (fil_space_get_flags(space)
== ULINT_UNDEFINED) {
if (!fil_space_get_size(space)) {
break;
}
/* fall through */
@@ -2810,8 +2809,7 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
case STORE_NO:
break;
case STORE_IF_EXISTS:
if (fil_space_get_flags(space)
== ULINT_UNDEFINED) {
if (!fil_space_get_size(space)) {
break;
}
/* fall through */

0 comments on commit 44be865

Please sign in to comment.