1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

MDEV-11153 - Introduce status variables for table cache monitoring and tuning

Status variables added: Table_open_cache_hits, Table_open_cache_misses,
Table_open_cache_overflows, Table_open_cache_active_instances.
This commit is contained in:
Sergey Vojtovich
2017-08-10 15:45:03 +04:00
parent 5d3ed9acdd
commit 613dd62a76
7 changed files with 99 additions and 9 deletions

View File

@@ -387,6 +387,39 @@ drop table t1;
# End of 5.3 tests
--echo #
--echo # MDEV-11153 - Introduce status variables for table cache monitoring and
--echo # tuning
--echo #
SET @old_table_open_cache= @@table_open_cache;
SET @@global.table_open_cache=10;
FLUSH TABLES;
FLUSH STATUS;
SHOW STATUS LIKE 'Table_open_cache%';
disable_query_log;
let $i= `SELECT @@table_open_cache + 5`;
while ($i)
{
eval CREATE TABLE t$i(a INT);
eval DELETE FROM t$i;
eval DELETE FROM t$i;
eval DELETE FROM t$i;
dec $i;
}
enable_query_log;
SHOW STATUS LIKE 'Table_open_cache%';
FLUSH TABLES;
FLUSH STATUS;
disable_query_log;
let $i= `SELECT @@table_open_cache + 5`;
while ($i)
{
eval DROP TABLE t$i;
dec $i;
}
enable_query_log;
SET @@global.table_open_cache= @old_table_open_cache;
# Restore global concurrent_insert value. Keep in the end of the test file.
--connection default
set @@global.concurrent_insert= @old_concurrent_insert;