~maria-captains/maria/xtradb-mergetree-5.5

« back to all changes in this revision

Viewing changes to include/dict0dict.ic

  • Committer: Sergei Golubchik
  • Date: 2013-09-07 07:47:42 UTC
  • Revision ID: sergii@pisem.net-20130907074742-ud2o8r0jkpe5vkxh
Percona-Server-5.5.33-rel31.1.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
 
3
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
823
823
}
824
824
 
825
825
/**********************************************************************//**
826
 
load a table into dictionary cache, ignore any error specified during load;
 
826
Gets a table; loads it to the dictionary cache if necessary. A low-level
 
827
function.
827
828
@return table, NULL if not found */
828
829
UNIV_INLINE
829
830
dict_table_t*
830
 
dict_table_get_low_ignore_err(
831
 
/*==========================*/
 
831
dict_table_get_low(
 
832
/*===============*/
832
833
        const char*     table_name,     /*!< in: table name */
833
834
        dict_err_ignore_t
834
835
                        ignore_err)     /*!< in: error to be ignored when
841
842
 
842
843
        table = dict_table_check_if_in_cache_low(table_name);
843
844
 
844
 
        if (table == NULL) {
845
 
                table = dict_load_table(table_name, TRUE, ignore_err);
846
 
        }
847
 
 
848
 
        ut_ad(!table || table->cached);
849
 
 
850
 
        return(table);
851
 
}
852
 
 
853
 
/**********************************************************************//**
854
 
Gets a table; loads it to the dictionary cache if necessary. A low-level
855
 
function.
856
 
@return table, NULL if not found */
857
 
UNIV_INLINE
858
 
dict_table_t*
859
 
dict_table_get_low(
860
 
/*===============*/
861
 
        const char*     table_name)     /*!< in: table name */
862
 
{
863
 
        dict_table_t*   table;
864
 
 
865
 
        ut_ad(table_name);
866
 
        ut_ad(mutex_own(&(dict_sys->mutex)));
867
 
 
868
 
        table = dict_table_check_if_in_cache_low(table_name);
869
 
 
870
 
        if (table && table->corrupted) {
 
845
        if (table && table->corrupted
 
846
            && !(ignore_err & DICT_ERR_IGNORE_CORRUPT)) {
871
847
                fprintf(stderr, "InnoDB: table");
872
848
                ut_print_name(stderr, NULL, TRUE, table->name);
873
849
                if (srv_load_corrupted) {
880
856
        }
881
857
 
882
858
        if (table == NULL) {
883
 
                table = dict_load_table(table_name, TRUE, DICT_ERR_IGNORE_NONE);
 
859
                table = dict_load_table(table_name, TRUE, ignore_err);
884
860
        }
885
861
 
886
862
        ut_ad(!table || table->cached);