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.
This commit is contained in:
Jan Lindström 2016-10-24 22:25:54 +03:00
parent 021212b525
commit 4edd4ad698
2 changed files with 12 additions and 2 deletions

View file

@ -1001,8 +1001,13 @@ retry:
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;
}

View file

@ -1002,8 +1002,13 @@ retry:
/* 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;
}
if (!space || UT_LIST_GET_FIRST(space->chain)->open) {
fil_node_t* node = UT_LIST_GET_FIRST(space->chain);
if (!node || node->open) {
return;
}