Commit 677d433d authored by marko's avatar marko

branches/5.1: dict_load_table(): If dict_load_indexes() fails,

invoke dict_table_remove_from_cache() instead of dict_mem_table_free(),
so that the data dictionary will not point to freed data.
(Bug #42075, Issue #153, rb://76 approved by Heikki Tuuri)
parent 40f7819e
......@@ -868,11 +868,11 @@ err_exit:
of the error condition, since the user may want to dump data from the
clustered index. However we load the foreign key information only if
all indexes were loaded. */
if (err != DB_SUCCESS && !srv_force_recovery) {
dict_mem_table_free(table);
table = NULL;
} else if (err == DB_SUCCESS) {
if (err == DB_SUCCESS) {
err = dict_load_foreigns(table->name, TRUE);
} else if (!srv_force_recovery) {
dict_table_remove_from_cache(table);
table = NULL;
}
#if 0
if (err != DB_SUCCESS && table != NULL) {
......
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