mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-8522: InnoDB: Assertion failure in file fil0fil.cc line 475
Analysis: In fil_crypt_space_needs_rotation we first make sure that tablespace is found and then separately that it is normal tablespace. Thus, tablespace could be dropped between these two functions calls. Fix: If space is not found from fil_system return tablespace type ULINT_UNDEFINED and naturally do not continue rotating space.
This commit is contained in:
parent
62b5a56191
commit
53623d932a
2 changed files with 14 additions and 8 deletions
|
@ -457,7 +457,7 @@ fil_space_get_latch(
|
|||
|
||||
/*******************************************************************//**
|
||||
Returns the type of a file space.
|
||||
@return FIL_TABLESPACE or FIL_LOG */
|
||||
@return ULINT_UNDEFINED, or FIL_TABLESPACE or FIL_LOG */
|
||||
UNIV_INTERN
|
||||
ulint
|
||||
fil_space_get_type(
|
||||
|
@ -465,6 +465,7 @@ fil_space_get_type(
|
|||
ulint id) /*!< in: space id */
|
||||
{
|
||||
fil_space_t* space;
|
||||
ulint type = ULINT_UNDEFINED;
|
||||
|
||||
ut_ad(fil_system);
|
||||
|
||||
|
@ -472,11 +473,13 @@ fil_space_get_type(
|
|||
|
||||
space = fil_space_get_by_id(id);
|
||||
|
||||
ut_a(space);
|
||||
|
||||
mutex_exit(&fil_system->mutex);
|
||||
|
||||
return(space->purpose);
|
||||
if (space) {
|
||||
type = space->purpose;
|
||||
}
|
||||
|
||||
return(type);
|
||||
}
|
||||
#endif /* !UNIV_HOTBACKUP */
|
||||
|
||||
|
|
|
@ -460,7 +460,7 @@ fil_space_get_latch(
|
|||
|
||||
/*******************************************************************//**
|
||||
Returns the type of a file space.
|
||||
@return FIL_TABLESPACE or FIL_LOG */
|
||||
@return ULINT_UNDEFINED, or FIL_TABLESPACE or FIL_LOG */
|
||||
UNIV_INTERN
|
||||
ulint
|
||||
fil_space_get_type(
|
||||
|
@ -468,6 +468,7 @@ fil_space_get_type(
|
|||
ulint id) /*!< in: space id */
|
||||
{
|
||||
fil_space_t* space;
|
||||
ulint type = ULINT_UNDEFINED;
|
||||
|
||||
ut_ad(fil_system);
|
||||
|
||||
|
@ -475,11 +476,13 @@ fil_space_get_type(
|
|||
|
||||
space = fil_space_get_by_id(id);
|
||||
|
||||
ut_a(space);
|
||||
|
||||
mutex_exit(&fil_system->mutex);
|
||||
|
||||
return(space->purpose);
|
||||
if (space) {
|
||||
type = space->purpose;
|
||||
}
|
||||
|
||||
return(type);
|
||||
}
|
||||
#endif /* !UNIV_HOTBACKUP */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue