mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03: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:
@@ -457,7 +457,7 @@ fil_space_get_latch(
|
|||||||
|
|
||||||
/*******************************************************************//**
|
/*******************************************************************//**
|
||||||
Returns the type of a file space.
|
Returns the type of a file space.
|
||||||
@return FIL_TABLESPACE or FIL_LOG */
|
@return ULINT_UNDEFINED, or FIL_TABLESPACE or FIL_LOG */
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
ulint
|
ulint
|
||||||
fil_space_get_type(
|
fil_space_get_type(
|
||||||
@@ -465,6 +465,7 @@ fil_space_get_type(
|
|||||||
ulint id) /*!< in: space id */
|
ulint id) /*!< in: space id */
|
||||||
{
|
{
|
||||||
fil_space_t* space;
|
fil_space_t* space;
|
||||||
|
ulint type = ULINT_UNDEFINED;
|
||||||
|
|
||||||
ut_ad(fil_system);
|
ut_ad(fil_system);
|
||||||
|
|
||||||
@@ -472,11 +473,13 @@ fil_space_get_type(
|
|||||||
|
|
||||||
space = fil_space_get_by_id(id);
|
space = fil_space_get_by_id(id);
|
||||||
|
|
||||||
ut_a(space);
|
|
||||||
|
|
||||||
mutex_exit(&fil_system->mutex);
|
mutex_exit(&fil_system->mutex);
|
||||||
|
|
||||||
return(space->purpose);
|
if (space) {
|
||||||
|
type = space->purpose;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(type);
|
||||||
}
|
}
|
||||||
#endif /* !UNIV_HOTBACKUP */
|
#endif /* !UNIV_HOTBACKUP */
|
||||||
|
|
||||||
|
@@ -460,7 +460,7 @@ fil_space_get_latch(
|
|||||||
|
|
||||||
/*******************************************************************//**
|
/*******************************************************************//**
|
||||||
Returns the type of a file space.
|
Returns the type of a file space.
|
||||||
@return FIL_TABLESPACE or FIL_LOG */
|
@return ULINT_UNDEFINED, or FIL_TABLESPACE or FIL_LOG */
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
ulint
|
ulint
|
||||||
fil_space_get_type(
|
fil_space_get_type(
|
||||||
@@ -468,6 +468,7 @@ fil_space_get_type(
|
|||||||
ulint id) /*!< in: space id */
|
ulint id) /*!< in: space id */
|
||||||
{
|
{
|
||||||
fil_space_t* space;
|
fil_space_t* space;
|
||||||
|
ulint type = ULINT_UNDEFINED;
|
||||||
|
|
||||||
ut_ad(fil_system);
|
ut_ad(fil_system);
|
||||||
|
|
||||||
@@ -475,11 +476,13 @@ fil_space_get_type(
|
|||||||
|
|
||||||
space = fil_space_get_by_id(id);
|
space = fil_space_get_by_id(id);
|
||||||
|
|
||||||
ut_a(space);
|
|
||||||
|
|
||||||
mutex_exit(&fil_system->mutex);
|
mutex_exit(&fil_system->mutex);
|
||||||
|
|
||||||
return(space->purpose);
|
if (space) {
|
||||||
|
type = space->purpose;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(type);
|
||||||
}
|
}
|
||||||
#endif /* !UNIV_HOTBACKUP */
|
#endif /* !UNIV_HOTBACKUP */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user