summaryrefslogtreecommitdiff
path: root/sql/sys_vars.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-01-11 11:55:07 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2019-01-11 11:55:07 +0100
commit1481d7a58b537d75f0a110e8a0514706adec669e (patch)
tree5254c37b3c0d0670c3c80a0b9216765f19fd3ec8 /sql/sys_vars.cc
parentd0d0f88f2cd4da23c2c2da702da51fb533e7fb8a (diff)
downloadmariadb-git-bb-10.0-MDEV-17475.tar.gz
MDEV-17475: Increase maximum possible value for table_definition_cache to match table_open_cachebb-10.0-MDEV-17475
Allow table definition cache be bigger than open table cache (due to problem with VIEWs and prepared statements).
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r--sql/sys_vars.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index a21fe5df247..71fdfa8f219 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -3039,11 +3039,15 @@ static Sys_var_charptr Sys_system_time_zone(
NO_CMD_LINE,
IN_SYSTEM_CHARSET, DEFAULT(system_time_zone));
+/*
+ If One use views with prepared statements this should be bigger than
+ table_open_cache (now we allow 2 times bigger value)
+*/
static Sys_var_ulong Sys_table_def_size(
"table_definition_cache",
"The number of cached table definitions",
GLOBAL_VAR(tdc_size), CMD_LINE(REQUIRED_ARG),
- VALID_RANGE(TABLE_DEF_CACHE_MIN, 512*1024),
+ VALID_RANGE(TABLE_DEF_CACHE_MIN, 2*1024*1024),
DEFAULT(TABLE_DEF_CACHE_DEFAULT), BLOCK_SIZE(1));
@@ -3055,7 +3059,7 @@ static bool fix_table_open_cache(sys_var *, THD *, enum_var_type)
return false;
}
-
+/* Check the table_definition_cache comment if makes changes */
static Sys_var_ulong Sys_table_cache_size(
"table_open_cache", "The number of cached open tables",
GLOBAL_VAR(tc_size), CMD_LINE(REQUIRED_ARG),