Commit 44be8652 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove fil_space_get_flags()

Replace fil_space_get_flags(space) == ULINT_UNDEFINED
with the functionally equivalent fil_space_get_size(space) == 0.
parent fb4a897f
...@@ -1469,37 +1469,6 @@ fil_space_get_size( ...@@ -1469,37 +1469,6 @@ fil_space_get_size(
return(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. /** Open each file. Only invoked on fil_system.temp_space.
@return whether all files were opened */ @return whether all files were opened */
bool fil_space_t::open() bool fil_space_t::open()
......
...@@ -1073,14 +1073,6 @@ ulint ...@@ -1073,14 +1073,6 @@ ulint
fil_space_get_size( fil_space_get_size(
/*===============*/ /*===============*/
ulint id); /*!< in: space id */ 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 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) ...@@ -2633,8 +2633,7 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
case STORE_NO: case STORE_NO:
break; break;
case STORE_IF_EXISTS: case STORE_IF_EXISTS:
if (fil_space_get_flags(space) if (!fil_space_get_size(space)) {
== ULINT_UNDEFINED) {
break; break;
} }
/* fall through */ /* fall through */
...@@ -2810,8 +2809,7 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply) ...@@ -2810,8 +2809,7 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
case STORE_NO: case STORE_NO:
break; break;
case STORE_IF_EXISTS: case STORE_IF_EXISTS:
if (fil_space_get_flags(space) if (!fil_space_get_size(space)) {
== ULINT_UNDEFINED) {
break; break;
} }
/* fall through */ /* fall through */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment