Skip to content

Commit 44be865

Browse files
committed
Cleanup: Remove fil_space_get_flags()
Replace fil_space_get_flags(space) == ULINT_UNDEFINED with the functionally equivalent fil_space_get_size(space) == 0.
1 parent fb4a897 commit 44be865

File tree

3 files changed

+2
-43
lines changed

3 files changed

+2
-43
lines changed

storage/innobase/fil/fil0fil.cc

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,37 +1469,6 @@ fil_space_get_size(
14691469
return(size);
14701470
}
14711471

1472-
/*******************************************************************//**
1473-
Returns the flags of the space. The tablespace must be cached
1474-
in the memory cache.
1475-
@return flags, ULINT_UNDEFINED if space not found */
1476-
ulint
1477-
fil_space_get_flags(
1478-
/*================*/
1479-
ulint id) /*!< in: space id */
1480-
{
1481-
fil_space_t* space;
1482-
ulint flags;
1483-
1484-
ut_ad(fil_system.is_initialised());
1485-
1486-
mutex_enter(&fil_system.mutex);
1487-
1488-
space = fil_space_get_space(id);
1489-
1490-
if (space == NULL) {
1491-
mutex_exit(&fil_system.mutex);
1492-
1493-
return(ULINT_UNDEFINED);
1494-
}
1495-
1496-
flags = space->flags;
1497-
1498-
mutex_exit(&fil_system.mutex);
1499-
1500-
return(flags);
1501-
}
1502-
15031472
/** Open each file. Only invoked on fil_system.temp_space.
15041473
@return whether all files were opened */
15051474
bool fil_space_t::open()

storage/innobase/include/fil0fil.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,14 +1073,6 @@ ulint
10731073
fil_space_get_size(
10741074
/*===============*/
10751075
ulint id); /*!< in: space id */
1076-
/*******************************************************************//**
1077-
Returns the flags of the space. The tablespace must be cached
1078-
in the memory cache.
1079-
@return flags, ULINT_UNDEFINED if space not found */
1080-
ulint
1081-
fil_space_get_flags(
1082-
/*================*/
1083-
ulint id); /*!< in: space id */
10841076

10851077
/*******************************************************************//**
10861078
Opens all log files and system tablespace data files. They stay open until the

storage/innobase/log/log0recv.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2633,8 +2633,7 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
26332633
case STORE_NO:
26342634
break;
26352635
case STORE_IF_EXISTS:
2636-
if (fil_space_get_flags(space)
2637-
== ULINT_UNDEFINED) {
2636+
if (!fil_space_get_size(space)) {
26382637
break;
26392638
}
26402639
/* fall through */
@@ -2810,8 +2809,7 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
28102809
case STORE_NO:
28112810
break;
28122811
case STORE_IF_EXISTS:
2813-
if (fil_space_get_flags(space)
2814-
== ULINT_UNDEFINED) {
2812+
if (!fil_space_get_size(space)) {
28152813
break;
28162814
}
28172815
/* fall through */

0 commit comments

Comments
 (0)