diff options
author | Timothy Smith <timothy.smith@sun.com> | 2009-03-02 18:08:02 -0700 |
---|---|---|
committer | Timothy Smith <timothy.smith@sun.com> | 2009-03-02 18:08:02 -0700 |
commit | 39a4ab6ce3340e43a6aee581792131a0da974498 (patch) | |
tree | 6a74e96aebed461824e47cb54393b216b7ac22bb /storage | |
parent | 20b1c21bf0fe4945d9326ec8a88386c2a70ea038 (diff) | |
download | mariadb-git-39a4ab6ce3340e43a6aee581792131a0da974498.tar.gz |
Applying InnoDB snashot 5.1-ss3931, part 2. Fixes
Bug #42075: dict_load_indexes failure in dict_load_table will corrupt the dictionary cache
Detailed revision comments:
r3930 | marko | 2009-01-14 15:51:30 +0200 (Wed, 14 Jan 2009) | 4 lines
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)
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/dict/dict0load.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c index f594e64f517..65f1c9536bd 100644 --- a/storage/innobase/dict/dict0load.c +++ b/storage/innobase/dict/dict0load.c @@ -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) { |