| 1 | /***************************************************************************** |
| 2 | |
| 3 | Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved. |
| 4 | |
| 5 | This program is free software; you can redistribute it and/or modify it under |
| 6 | the terms of the GNU General Public License as published by the Free Software |
| 7 | Foundation; version 2 of the License. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, but WITHOUT |
| 10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 11 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
| 12 | |
| 13 | You should have received a copy of the GNU General Public License along with |
| 14 | this program; if not, write to the Free Software Foundation, Inc., |
| 15 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA |
| 16 | |
| 17 | *****************************************************************************/ |
| 18 | |
| 19 | /**************************************************//** |
| 20 | @file include/dict0priv.h |
| 21 | Data dictionary private functions |
| 22 | |
| 23 | Created Fri 2 Jul 2010 13:30:38 EST - Sunny Bains |
| 24 | *******************************************************/ |
| 25 | |
| 26 | #ifndef dict0priv_h |
| 27 | #define dict0priv_h |
| 28 | |
| 29 | #include "univ.i" |
| 30 | |
| 31 | /**********************************************************************//** |
| 32 | Gets a table; loads it to the dictionary cache if necessary. A low-level |
| 33 | function. Note: Not to be called from outside dict0*c functions. |
| 34 | @return table, NULL if not found */ |
| 35 | UNIV_INLINE |
| 36 | dict_table_t* |
| 37 | dict_table_get_low( |
| 38 | /*===============*/ |
| 39 | const char* table_name); /*!< in: table name */ |
| 40 | |
| 41 | /**********************************************************************//** |
| 42 | Checks if a table is in the dictionary cache. |
| 43 | @return table, NULL if not found */ |
| 44 | UNIV_INLINE |
| 45 | dict_table_t* |
| 46 | dict_table_check_if_in_cache_low( |
| 47 | /*=============================*/ |
| 48 | const char* table_name); /*!< in: table name */ |
| 49 | |
| 50 | /**********************************************************************//** |
| 51 | Returns a table object based on table id. |
| 52 | @return table, NULL if does not exist */ |
| 53 | UNIV_INLINE |
| 54 | dict_table_t* |
| 55 | dict_table_open_on_id_low( |
| 56 | /*=====================*/ |
| 57 | table_id_t table_id, /*!< in: table id */ |
| 58 | dict_err_ignore_t ignore_err, /*!< in: errors to ignore |
| 59 | when loading the table */ |
| 60 | ibool open_only_if_in_cache); |
| 61 | |
| 62 | #include "dict0priv.ic" |
| 63 | |
| 64 | #endif /* dict0priv.h */ |
| 65 | |