mirror of
https://github.com/MariaDB/server.git
synced 2025-07-04 01:23:45 +03:00
BUG#11754170: TEST CASE FOR BUG#28211 IS DISABLED IN QUERY_CACHE.TEST as RENAME DATABASE
and query_cache don't play along nicely. An alternative for RENAME DATABSE using RENAME TABLE has been used to implement this.
This commit is contained in:
@ -1583,6 +1583,58 @@ show status like 'Qcache_free_blocks';
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_free_blocks 0
|
Qcache_free_blocks 0
|
||||||
Restore default values.
|
Restore default values.
|
||||||
|
drop database if exists db1;
|
||||||
|
drop database if exists db2;
|
||||||
|
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;
|
||||||
|
c1
|
||||||
|
1
|
||||||
|
show status like 'Qcache_queries_in_cache';
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_queries_in_cache 1
|
||||||
|
create database db2;
|
||||||
|
rename table db1.t1 to db2.t2;
|
||||||
|
drop database db1;
|
||||||
|
show status like 'Qcache_queries_in_cache';
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_queries_in_cache 0
|
||||||
|
drop database db2;
|
||||||
|
set global query_cache_size=default;
|
||||||
|
drop database if exists db1;
|
||||||
|
drop database if exists db3;
|
||||||
|
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;
|
||||||
|
c1
|
||||||
|
1
|
||||||
|
select c1+1 from db1.t1;
|
||||||
|
c1+1
|
||||||
|
2
|
||||||
|
select * from db3.t1;
|
||||||
|
c1
|
||||||
|
show status like 'Qcache_queries_in_cache';
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_queries_in_cache 3
|
||||||
|
create database db2;
|
||||||
|
rename table db1.t1 to db2.t2;
|
||||||
|
drop database db1;
|
||||||
|
show status like 'Qcache_queries_in_cache';
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_queries_in_cache 1
|
||||||
|
drop database db2;
|
||||||
|
drop database db3;
|
||||||
set GLOBAL query_cache_type=default;
|
set GLOBAL query_cache_type=default;
|
||||||
set GLOBAL query_cache_limit=default;
|
set GLOBAL query_cache_limit=default;
|
||||||
set GLOBAL query_cache_min_res_unit=default;
|
set GLOBAL query_cache_min_res_unit=default;
|
||||||
@ -1609,7 +1661,7 @@ c1
|
|||||||
2
|
2
|
||||||
SHOW STATUS LIKE 'Qcache_hits';
|
SHOW STATUS LIKE 'Qcache_hits';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 0
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET GLOBAL concurrent_insert= @save_concurrent_insert;
|
SET GLOBAL concurrent_insert= @save_concurrent_insert;
|
||||||
SET GLOBAL query_cache_size= default;
|
SET GLOBAL query_cache_size= default;
|
||||||
@ -1639,7 +1691,7 @@ a
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
SHOW STATUS LIKE 'Qcache_queries_in_cache';
|
SHOW STATUS LIKE 'Qcache_queries_in_cache';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 2
|
Qcache_queries_in_cache 0
|
||||||
SHOW STATUS LIKE "Qcache_hits";
|
SHOW STATUS LIKE "Qcache_hits";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 0
|
Qcache_hits 0
|
||||||
@ -1661,7 +1713,7 @@ a
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
SHOW STATUS LIKE "Qcache_hits";
|
SHOW STATUS LIKE "Qcache_hits";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 2
|
Qcache_hits 0
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET GLOBAL query_cache_size= default;
|
SET GLOBAL query_cache_size= default;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
|
@ -1193,47 +1193,48 @@ set global query_cache_type=0;
|
|||||||
show status like 'Qcache_free_blocks';
|
show status like 'Qcache_free_blocks';
|
||||||
|
|
||||||
--echo Restore default values.
|
--echo Restore default values.
|
||||||
# Bug#28211 RENAME DATABASE and query cache don't play nicely together
|
--disable_warnings
|
||||||
#
|
drop database if exists db1;
|
||||||
# TODO: enable these tests when RENAME DATABASE is implemented.
|
drop database if exists db2;
|
||||||
# --disable_warnings
|
--enable_warnings
|
||||||
# drop database if exists db1;
|
set GLOBAL query_cache_size=15*1024*1024;
|
||||||
# drop database if exists db2;
|
create database db1;
|
||||||
# --enable_warnings
|
use db1;
|
||||||
# set GLOBAL query_cache_size=15*1024*1024;
|
create table t1(c1 int)engine=myisam;
|
||||||
# create database db1;
|
insert into t1(c1) values (1);
|
||||||
# use db1;
|
select * from db1.t1 f;
|
||||||
# create table t1(c1 int)engine=myisam;
|
show status like 'Qcache_queries_in_cache';
|
||||||
# insert into t1(c1) values (1);
|
create database db2;
|
||||||
# select * from db1.t1 f;
|
rename table db1.t1 to db2.t2;
|
||||||
# show status like 'Qcache_queries_in_cache';
|
drop database db1;
|
||||||
# rename schema db1 to db2;
|
show status like 'Qcache_queries_in_cache';
|
||||||
# show status like 'Qcache_queries_in_cache';
|
drop database db2;
|
||||||
# drop database db2;
|
set global query_cache_size=default;
|
||||||
# set global query_cache_size=default;
|
|
||||||
#
|
--disable_warnings
|
||||||
# --disable_warnings
|
drop database if exists db1;
|
||||||
# drop database if exists db1;
|
drop database if exists db3;
|
||||||
# drop database if exists db3;
|
--enable_warnings
|
||||||
# --enable_warnings
|
set GLOBAL query_cache_size=15*1024*1024;
|
||||||
# set GLOBAL query_cache_size=15*1024*1024;
|
create database db1;
|
||||||
# create database db1;
|
create database db3;
|
||||||
# create database db3;
|
use db1;
|
||||||
# use db1;
|
create table t1(c1 int) engine=myisam;
|
||||||
# create table t1(c1 int) engine=myisam;
|
use db3;
|
||||||
# use db3;
|
create table t1(c1 int) engine=myisam;
|
||||||
# create table t1(c1 int) engine=myisam;
|
use db1;
|
||||||
# use db1;
|
insert into t1(c1) values (1);
|
||||||
# insert into t1(c1) values (1);
|
use mysql;
|
||||||
# use mysql;
|
select * from db1.t1;
|
||||||
# select * from db1.t1;
|
select c1+1 from db1.t1;
|
||||||
# select c1+1 from db1.t1;
|
select * from db3.t1;
|
||||||
# select * from db3.t1;
|
show status like 'Qcache_queries_in_cache';
|
||||||
# show status like 'Qcache_queries_in_cache';
|
create database db2;
|
||||||
# rename schema db1 to db2;
|
rename table db1.t1 to db2.t2;
|
||||||
# show status like 'Qcache_queries_in_cache';
|
drop database db1;
|
||||||
# drop database db2;
|
show status like 'Qcache_queries_in_cache';
|
||||||
# drop database db3;
|
drop database db2;
|
||||||
|
drop database db3;
|
||||||
|
|
||||||
set GLOBAL query_cache_type=default;
|
set GLOBAL query_cache_type=default;
|
||||||
set GLOBAL query_cache_limit=default;
|
set GLOBAL query_cache_limit=default;
|
||||||
|
Reference in New Issue
Block a user