2019-08-30 15:06:54 +02:00
|
|
|
set @save_query_cache_size=@@query_cache_size;
|
2004-02-20 21:44:54 +01:00
|
|
|
set GLOBAL query_cache_size=1355776;
|
2015-08-11 18:45:38 +02:00
|
|
|
set GLOBAL query_cache_type=ON;
|
|
|
|
set LOCAL query_cache_type=ON;
|
2004-02-20 21:44:54 +01:00
|
|
|
drop database if exists MySQLtesT;
|
|
|
|
create database MySQLtesT;
|
|
|
|
create table MySQLtesT.t1 (a int);
|
|
|
|
select * from MySQLtesT.t1;
|
|
|
|
a
|
|
|
|
show status like "Qcache_queries_in_cache";
|
|
|
|
Variable_name Value
|
|
|
|
Qcache_queries_in_cache 1
|
|
|
|
drop database mysqltest;
|
|
|
|
show status like "Qcache_queries_in_cache";
|
|
|
|
Variable_name Value
|
|
|
|
Qcache_queries_in_cache 0
|
|
|
|
use MySQL;
|
|
|
|
select * from db;
|
|
|
|
show status like "Qcache_queries_in_cache";
|
|
|
|
Variable_name Value
|
|
|
|
Qcache_queries_in_cache 0
|
|
|
|
use test;
|
|
|
|
select * from MySQL.db;
|
|
|
|
show status like "Qcache_queries_in_cache";
|
|
|
|
Variable_name Value
|
|
|
|
Qcache_queries_in_cache 0
|
2019-08-30 15:06:54 +02:00
|
|
|
set GLOBAL query_cache_size=@save_query_cache_size;
|
2015-08-11 18:45:38 +02:00
|
|
|
set GLOBAL query_cache_type=default;
|