summaryrefslogtreecommitdiff
path: root/storage/innobase/include/dict0priv.ic
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@skysql.com>2014-08-06 15:28:58 +0300
committerJan Lindström <jan.lindstrom@skysql.com>2014-08-06 15:28:58 +0300
commit6dad23f04aa5c8a022193cc74b62652a3c1e3057 (patch)
tree85141ad578749597ba997677bb56d3deddd17b4d /storage/innobase/include/dict0priv.ic
parente974b564389af8251c2ba51060e6129e45431586 (diff)
downloadmariadb-git-6dad23f04aa5c8a022193cc74b62652a3c1e3057.tar.gz
MDEV-5834: Merge Kakao Defragmentation implementation to MariaDB 10.1
Merge https://github.com/kakao/mariadb-10.0 that contains Facebook's implementation for defragmentation facebook/mysql-5.6@a2d3a74 facebook/mysql-5.6@def96c8 facebook/mysql-5.6@9c67c5d facebook/mysql-5.6@921a81b facebook/mysql-5.6@aa519bd facebook/mysql-5.6@fea7d13 facebook/mysql-5.6@09b29d3 facebook/mysql-5.6@9284abb facebook/mysql-5.6@dbd623d facebook/mysql-5.6@aed55dc facebook/mysql-5.6@aad5c82 This version does not add new SQL-syntax and new handler API function. Instead optimize table is mapped to defragment table if innodb_defragment=ON, by default the feature is off. Contains changes authored by Sunguck Lee (Kakao).
Diffstat (limited to 'storage/innobase/include/dict0priv.ic')
-rw-r--r--storage/innobase/include/dict0priv.ic5
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/innobase/include/dict0priv.ic b/storage/innobase/include/dict0priv.ic
index 30ba8fb60aa..983218af78a 100644
--- a/storage/innobase/include/dict0priv.ic
+++ b/storage/innobase/include/dict0priv.ic
@@ -74,8 +74,9 @@ dict_table_t*
dict_table_open_on_id_low(
/*======================*/
table_id_t table_id, /*!< in: table id */
- dict_err_ignore_t ignore_err) /*!< in: errors to ignore
+ dict_err_ignore_t ignore_err, /*!< in: errors to ignore
when loading the table */
+ ibool open_only_if_in_cache)
{
dict_table_t* table;
ulint fold;
@@ -88,7 +89,7 @@ dict_table_open_on_id_low(
HASH_SEARCH(id_hash, dict_sys->table_id_hash, fold,
dict_table_t*, table, ut_ad(table->cached),
table->id == table_id);
- if (table == NULL) {
+ if (table == NULL && !open_only_if_in_cache) {
table = dict_load_table_on_id(table_id, ignore_err);
}