diff options
author | Jimmy Yang <jimmy.yang@oracle.com> | 2011-08-29 02:44:28 -0700 |
---|---|---|
committer | Jimmy Yang <jimmy.yang@oracle.com> | 2011-08-29 02:44:28 -0700 |
commit | 07770e7e8e43f482589b964fab0e74fcd1cba7c2 (patch) | |
tree | c819b8b661fc3960cea75b58acdbc0a6df8a36a5 /storage/innobase/dict/dict0dict.c | |
parent | 972aeb03742c025eb0b947ce5917ed21c24c9d7f (diff) | |
download | mariadb-git-07770e7e8e43f482589b964fab0e74fcd1cba7c2.tar.gz |
Fix Bug 12922077 - SEGV IN DICT_SET_CORRUPTED_INDEX_CACHE_ONLY(), DROP TABLE
rb://752 approved by Sunny Bains
Diffstat (limited to 'storage/innobase/dict/dict0dict.c')
-rw-r--r-- | storage/innobase/dict/dict0dict.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index dfb733cb36c..2a2c7652817 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -5206,7 +5206,8 @@ UNIV_INTERN void dict_set_corrupted_index_cache_only( /*================================*/ - dict_index_t* index) /*!< in/out: index */ + dict_index_t* index, /*!< in/out: index */ + dict_table_t* table) /*!< in/out: table */ { ut_ad(index); ut_ad(mutex_own(&dict_sys->mutex)); @@ -5216,7 +5217,14 @@ dict_set_corrupted_index_cache_only( /* Mark the table as corrupted only if the clustered index is corrupted */ if (dict_index_is_clust(index)) { - index->table->corrupted = TRUE; + dict_table_t* corrupt_table; + + corrupt_table = table ? table : index->table; + ut_ad(!index->table || !table || index->table == table); + + if (corrupt_table) { + corrupt_table->corrupted = TRUE; + } } index->type |= DICT_CORRUPT; |