3894 Dmitry Lenev 2012-05-15
WL#5772 "Add partitioned Table Definition Cache to avoid
using LOCK_open and its derivatives in DML queries".
Review change #6:
Update description of --table-open-cache option to
better reflect its "new" meaning.
modified:
mysql-test/r/mysqld--help-notwin.result
mysql-test/r/mysqld--help-win.result
sql/sys_vars.cc
3893 Dmitry Lenev 2012-05-12
WL#5772 "Add partitioned Table Definition Cache to avoid
using LOCK_open and its derivatives in DML queries".
Review changes #5:
- Made status variables for table cache visible in SHOW STATUS.
- Added test coverage for them.
- Fixed setting of @@table_open_cache size at runtime.
modified:
mysql-test/r/status.result
mysql-test/t/status.test
sql/mysqld.cc
sql/sys_vars.cc
=== modified file 'mysql-test/r/mysqld--help-notwin.result'
--- a/mysql-test/r/mysqld--help-notwin.result 2012-05-03 10:22:18 +0000
+++ b/mysql-test/r/mysqld--help-notwin.result 2012-05-14 20:05:23 +0000
@@ -852,7 +852,8 @@ The following options may be given as th
--table-definition-cache=#
The number of cached table definitions
--table-open-cache=#
- The number of cached open tables
+ The number of cached open tables (total for all table
+ cache instances)
--table-open-cache-instances=#
The number of table cache instances
--tc-heuristic-recover=name
=== modified file 'mysql-test/r/mysqld--help-win.result'
--- a/mysql-test/r/mysqld--help-win.result 2012-05-03 10:22:18 +0000
+++ b/mysql-test/r/mysqld--help-win.result 2012-05-14 20:05:23 +0000
@@ -860,7 +860,8 @@ The following options may be given as th
--table-definition-cache=#
The number of cached table definitions
--table-open-cache=#
- The number of cached open tables
+ The number of cached open tables (total for all table
+ cache instances)
--table-open-cache-instances=#
The number of table cache instances
--tc-heuristic-recover=name
=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc 2012-05-12 14:54:12 +0000
+++ b/sql/sys_vars.cc 2012-05-14 20:05:23 +0000
@@ -2715,12 +2715,18 @@ static Sys_var_ulong Sys_table_def_size(
static bool fix_table_cache_size(sys_var *self, THD *thd, enum_var_type type)
{
+ /*
+ table_open_cache parameter is a soft limit for total number of objects
+ in all table cache instances. Once this value is updated we need to
+ update value of a per-instance soft limit on table cache size.
+ */
table_cache_size_per_instance= table_cache_size / table_cache_instances;
return false;
}
static Sys_var_ulong Sys_table_cache_size(
- "table_open_cache", "The number of cached open tables",
+ "table_open_cache", "The number of cached open tables "
+ "(total for all table cache instances)",
GLOBAL_VAR(table_cache_size), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(1, 512*1024), DEFAULT(TABLE_OPEN_CACHE_DEFAULT),
BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (Dmitry.Lenev:3893 to 3894) WL#5772 | Dmitry Lenev | 16 May |