Commit 95ec5bdd authored by bin.x.su@oracle.com's avatar bin.x.su@oracle.com

BUG#18942294 - SEGV IN DICT_FIND_TABLE_BY_SPACE TRYING TO MARK SPACE CORRUPT

IN RECOVERY

During redo log processing, the data dictionary is not available. We should
check it in dict_find_table_by_space() to prevent SEGV error.

rb#5678, approved by Jimmy.
parent 4e62c189
......@@ -3562,6 +3562,10 @@ buf_page_io_complete(
(ulong) bpage->offset);
}
DBUG_EXECUTE_IF("set_dict_sys_to_null",
dict_sys = NULL;
goto corrupt;);
/* From version 3.23.38 up we store the page checksum
to the 4 first bytes of the page end lsn field */
......@@ -3616,6 +3620,11 @@ corrupt:
" because of"
" a corrupt database page.\n",
stderr);
DBUG_EXECUTE_IF(
"set_dict_sys_to_null",
DBUG_SUICIDE(););
ut_error;
}
}
......
......@@ -5364,6 +5364,11 @@ dict_find_table_by_space(
ut_ad(space_id > 0);
if (dict_sys == NULL) {
/* This could happen when it's in redo processing. */
return(NULL);
}
table = UT_LIST_GET_FIRST(dict_sys->table_LRU);
num_item = UT_LIST_GET_LEN(dict_sys->table_LRU);
......
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