diff options
author | Jimmy Yang <jimmy.yang@oracle.com> | 2011-02-09 01:15:06 -0800 |
---|---|---|
committer | Jimmy Yang <jimmy.yang@oracle.com> | 2011-02-09 01:15:06 -0800 |
commit | 82d8ca01c8a807addd5dbc2923d276b53977a6f8 (patch) | |
tree | 2bf50a56f980b07e7021a6f5fb525487e2cdc780 /storage/innobase/include/dict0dict.ic | |
parent | 27fbb7c18c8912c742289572d8fa39ba7c802c86 (diff) | |
download | mariadb-git-82d8ca01c8a807addd5dbc2923d276b53977a6f8.tar.gz |
Fix Bug #59048 truncate table or create index could leave index->page
to be FIL_NULL
rb://545 approved by Sunny Bains
Diffstat (limited to 'storage/innobase/include/dict0dict.ic')
-rw-r--r-- | storage/innobase/include/dict0dict.ic | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index 42f124dedfc..59606af7056 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -828,6 +828,34 @@ dict_table_check_if_in_cache_low( } /**********************************************************************//** +load a table into dictionary cache, ignore any error specified during load; +@return table, NULL if not found */ +UNIV_INLINE +dict_table_t* +dict_table_get_low_ignore_err( +/*==========================*/ + const char* table_name, /*!< in: table name */ + dict_err_ignore_t + ignore_err) /*!< in: error to be ignored when + loading a table definition */ +{ + dict_table_t* table; + + ut_ad(table_name); + ut_ad(mutex_own(&(dict_sys->mutex))); + + table = dict_table_check_if_in_cache_low(table_name); + + if (table == NULL) { + table = dict_load_table(table_name, TRUE, ignore_err); + } + + ut_ad(!table || table->cached); + + return(table); +} + +/**********************************************************************//** Gets a table; loads it to the dictionary cache if necessary. A low-level function. @return table, NULL if not found */ @@ -845,7 +873,7 @@ dict_table_get_low( table = dict_table_check_if_in_cache_low(table_name); if (table == NULL) { - table = dict_load_table(table_name, TRUE); + table = dict_load_table(table_name, TRUE, DICT_ERR_IGNORE_NONE); } ut_ad(!table || table->cached); |