diff options
author | unknown <bin.x.su@oracle.com> | 2013-06-25 09:42:54 +0800 |
---|---|---|
committer | unknown <bin.x.su@oracle.com> | 2013-06-25 09:42:54 +0800 |
commit | 3684c2b182cc9044d27d5f2fcc6c2486ffddf2d6 (patch) | |
tree | abed41b4e45e9bbebb1781a51bd3c1ca590c2a2a /storage/innobase/include/dict0dict.ic | |
parent | 87015f4cc540515d2f7c672594c0d4b74d05ca0c (diff) | |
download | mariadb-git-3684c2b182cc9044d27d5f2fcc6c2486ffddf2d6.tar.gz |
Bug 16876388 - PLEASE BACKPORT BUG#16208542 TO 5.5
Straight forward backport.
Approved by Jimmy, rb#2656
Diffstat (limited to 'storage/innobase/include/dict0dict.ic')
-rw-r--r-- | storage/innobase/include/dict0dict.ic | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index faa28959c59..9b0c9e5c001 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -816,34 +816,6 @@ 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 */ @@ -851,7 +823,10 @@ UNIV_INLINE dict_table_t* dict_table_get_low( /*===============*/ - const char* table_name) /*!< in: table name */ + 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; @@ -860,7 +835,8 @@ dict_table_get_low( table = dict_table_check_if_in_cache_low(table_name); - if (table && table->corrupted) { + if (table && table->corrupted + && !(ignore_err & DICT_ERR_IGNORE_CORRUPT)) { fprintf(stderr, "InnoDB: table"); ut_print_name(stderr, NULL, TRUE, table->name); if (srv_load_corrupted) { @@ -873,7 +849,7 @@ dict_table_get_low( } if (table == NULL) { - table = dict_load_table(table_name, TRUE, DICT_ERR_IGNORE_NONE); + table = dict_load_table(table_name, TRUE, ignore_err); } ut_ad(!table || table->cached); |