Commit 4edd4ad6 authored by Jan Lindström's avatar Jan Lindström

MDEV-10970: Crash while loading mysqldump backup when InnoDB encryption is enabled

Follow-up: Make sure we do not reference NULL-pointer when space is being
dropped and does not contain any nodes.
parent 021212b5
......@@ -1001,8 +1001,13 @@ fil_mutex_enter_and_prepare_for_io(
does not exist, we handle the situation in the function which called
this function */
if (!space || UT_LIST_GET_FIRST(space->chain)->open) {
if (!space) {
return;
}
fil_node_t* node = UT_LIST_GET_FIRST(space->chain);
if (!node || node->open) {
return;
}
......
......@@ -1002,8 +1002,13 @@ fil_mutex_enter_and_prepare_for_io(
/* If the file is already open, no need to do anything; if the space
does not exist, we handle the situation in the function which called
this function */
if (!space) {
return;
}
fil_node_t* node = UT_LIST_GET_FIRST(space->chain);
if (!space || UT_LIST_GET_FIRST(space->chain)->open) {
if (!node || node->open) {
return;
}
......
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