|
|
@ -1193,47 +1193,48 @@ set global query_cache_type=0; |
|
|
|
show status like 'Qcache_free_blocks'; |
|
|
|
|
|
|
|
--echo Restore default values. |
|
|
|
# Bug#28211 RENAME DATABASE and query cache don't play nicely together |
|
|
|
# |
|
|
|
# TODO: enable these tests when RENAME DATABASE is implemented. |
|
|
|
# --disable_warnings |
|
|
|
# drop database if exists db1; |
|
|
|
# drop database if exists db2; |
|
|
|
# --enable_warnings |
|
|
|
# set GLOBAL query_cache_size=15*1024*1024; |
|
|
|
# create database db1; |
|
|
|
# use db1; |
|
|
|
# create table t1(c1 int)engine=myisam; |
|
|
|
# insert into t1(c1) values (1); |
|
|
|
# select * from db1.t1 f; |
|
|
|
# show status like 'Qcache_queries_in_cache'; |
|
|
|
# rename schema db1 to db2; |
|
|
|
# show status like 'Qcache_queries_in_cache'; |
|
|
|
# drop database db2; |
|
|
|
# set global query_cache_size=default; |
|
|
|
# |
|
|
|
# --disable_warnings |
|
|
|
# drop database if exists db1; |
|
|
|
# drop database if exists db3; |
|
|
|
# --enable_warnings |
|
|
|
# set GLOBAL query_cache_size=15*1024*1024; |
|
|
|
# create database db1; |
|
|
|
# create database db3; |
|
|
|
# use db1; |
|
|
|
# create table t1(c1 int) engine=myisam; |
|
|
|
# use db3; |
|
|
|
# create table t1(c1 int) engine=myisam; |
|
|
|
# use db1; |
|
|
|
# insert into t1(c1) values (1); |
|
|
|
# use mysql; |
|
|
|
# select * from db1.t1; |
|
|
|
# select c1+1 from db1.t1; |
|
|
|
# select * from db3.t1; |
|
|
|
# show status like 'Qcache_queries_in_cache'; |
|
|
|
# rename schema db1 to db2; |
|
|
|
# show status like 'Qcache_queries_in_cache'; |
|
|
|
# drop database db2; |
|
|
|
# drop database db3; |
|
|
|
--disable_warnings |
|
|
|
drop database if exists db1; |
|
|
|
drop database if exists db2; |
|
|
|
--enable_warnings |
|
|
|
set GLOBAL query_cache_size=15*1024*1024; |
|
|
|
create database db1; |
|
|
|
use db1; |
|
|
|
create table t1(c1 int)engine=myisam; |
|
|
|
insert into t1(c1) values (1); |
|
|
|
select * from db1.t1 f; |
|
|
|
show status like 'Qcache_queries_in_cache'; |
|
|
|
create database db2; |
|
|
|
rename table db1.t1 to db2.t2; |
|
|
|
drop database db1; |
|
|
|
show status like 'Qcache_queries_in_cache'; |
|
|
|
drop database db2; |
|
|
|
set global query_cache_size=default; |
|
|
|
|
|
|
|
--disable_warnings |
|
|
|
drop database if exists db1; |
|
|
|
drop database if exists db3; |
|
|
|
--enable_warnings |
|
|
|
set GLOBAL query_cache_size=15*1024*1024; |
|
|
|
create database db1; |
|
|
|
create database db3; |
|
|
|
use db1; |
|
|
|
create table t1(c1 int) engine=myisam; |
|
|
|
use db3; |
|
|
|
create table t1(c1 int) engine=myisam; |
|
|
|
use db1; |
|
|
|
insert into t1(c1) values (1); |
|
|
|
use mysql; |
|
|
|
select * from db1.t1; |
|
|
|
select c1+1 from db1.t1; |
|
|
|
select * from db3.t1; |
|
|
|
show status like 'Qcache_queries_in_cache'; |
|
|
|
create database db2; |
|
|
|
rename table db1.t1 to db2.t2; |
|
|
|
drop database db1; |
|
|
|
show status like 'Qcache_queries_in_cache'; |
|
|
|
drop database db2; |
|
|
|
drop database db3; |
|
|
|
|
|
|
|
set GLOBAL query_cache_type=default; |
|
|
|
set GLOBAL query_cache_limit=default; |
|
|
|