Commit de0c78c0 authored by unknown's avatar unknown

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 dbed459a
...@@ -3562,6 +3562,10 @@ buf_page_io_complete( ...@@ -3562,6 +3562,10 @@ buf_page_io_complete(
(ulong) bpage->offset); (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 /* From version 3.23.38 up we store the page checksum
to the 4 first bytes of the page end lsn field */ to the 4 first bytes of the page end lsn field */
...@@ -3616,6 +3620,11 @@ buf_page_io_complete( ...@@ -3616,6 +3620,11 @@ buf_page_io_complete(
" because of" " because of"
" a corrupt database page.\n", " a corrupt database page.\n",
stderr); stderr);
DBUG_EXECUTE_IF(
"set_dict_sys_to_null",
DBUG_SUICIDE(););
ut_error; ut_error;
} }
} }
......
...@@ -5364,6 +5364,11 @@ dict_find_table_by_space( ...@@ -5364,6 +5364,11 @@ dict_find_table_by_space(
ut_ad(space_id > 0); 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); table = UT_LIST_GET_FIRST(dict_sys->table_LRU);
num_item = UT_LIST_GET_LEN(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