Skip to content

Commit

Permalink
Cleanup: Remove fil_space_t::magic_n
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jun 6, 2022
1 parent c86d1da commit b29a811
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
7 changes: 1 addition & 6 deletions storage/innobase/fil/fil0fil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,7 @@ fil_space_get_by_id(
mysql_mutex_assert_owner(&fil_system.mutex);

HASH_SEARCH(hash, &fil_system.spaces, id,
fil_space_t*, space,
ut_ad(space->magic_n == FIL_SPACE_MAGIC_N),
space->id == id);
fil_space_t*, space,, space->id == id);

return(space);
}
Expand Down Expand Up @@ -803,8 +801,6 @@ pfs_os_file_t fil_system_t::detach(fil_space_t *space, bool detach_handle)
else if (space == temp_space)
temp_space= nullptr;

ut_a(space->magic_n == FIL_SPACE_MAGIC_N);

for (fil_node_t* node= UT_LIST_GET_FIRST(space->chain); node;
node= UT_LIST_GET_NEXT(chain, node))
if (node->is_open())
Expand Down Expand Up @@ -943,7 +939,6 @@ fil_space_t *fil_space_t::create(ulint id, ulint flags,
space->purpose = purpose;
space->flags = flags;

space->magic_n = FIL_SPACE_MAGIC_N;
space->crypt_data = crypt_data;
space->n_pending.store(CLOSING, std::memory_order_relaxed);

Expand Down
5 changes: 0 additions & 5 deletions storage/innobase/include/fil0fil.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,6 @@ struct fil_space_t final
/** Stores last page freed lsn. Protected by freed_mutex */
lsn_t last_freed_lsn;

ulint magic_n;/*!< FIL_SPACE_MAGIC_N */

/** @return whether doublewrite buffering is needed */
inline bool use_doublewrite() const;

Expand Down Expand Up @@ -1085,9 +1083,6 @@ struct fil_space_t final
};

#ifndef UNIV_INNOCHECKSUM
/** Value of fil_space_t::magic_n */
#define FIL_SPACE_MAGIC_N 89472

/** File node of a tablespace or the log data space */
struct fil_node_t final
{
Expand Down

0 comments on commit b29a811

Please sign in to comment.