mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-617 LP:671189 - Query cache is not used for tables or databases with dots in their names
test suite added to be sure that bug is fixed
This commit is contained in:
@@ -1944,6 +1944,41 @@ COUNT(*)
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET GLOBAL query_cache_size= @qc;
|
SET GLOBAL query_cache_size= @qc;
|
||||||
#
|
#
|
||||||
|
End of 5.5 tests
|
||||||
|
#
|
||||||
|
# MDEV-617 LP:671189 - Query cache is not used for tables or
|
||||||
|
# databases with dots in their names
|
||||||
|
#
|
||||||
|
CREATE DATABASE `foo.bar`;
|
||||||
|
use `foo.bar`;
|
||||||
|
flush status;
|
||||||
|
CREATE TABLE moocow (a int);
|
||||||
|
INSERT INTO moocow VALUES (1), (2), (3);
|
||||||
|
SHOW STATUS LIKE 'Qcache_inserts';
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_inserts 0
|
||||||
|
SELECT * FROM moocow;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
SHOW STATUS LIKE 'Qcache_inserts';
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_inserts 1
|
||||||
|
SHOW STATUS LIKE 'Qcache_hits';
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_hits 0
|
||||||
|
SELECT * FROM moocow;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
SHOW STATUS LIKE 'Qcache_hits';
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_hits 1
|
||||||
|
use test;
|
||||||
|
drop database `foo.bar`;
|
||||||
|
End of 10.0 tests
|
||||||
restore defaults
|
restore defaults
|
||||||
SET GLOBAL query_cache_type= default;
|
SET GLOBAL query_cache_type= default;
|
||||||
SET GLOBAL query_cache_size= default;
|
SET GLOBAL query_cache_size= default;
|
||||||
|
@@ -1628,6 +1628,28 @@ DROP TABLE t1;
|
|||||||
SET GLOBAL query_cache_size= @qc;
|
SET GLOBAL query_cache_size= @qc;
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
--echo End of 5.5 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-617 LP:671189 - Query cache is not used for tables or
|
||||||
|
--echo # databases with dots in their names
|
||||||
|
--echo #
|
||||||
|
CREATE DATABASE `foo.bar`;
|
||||||
|
use `foo.bar`;
|
||||||
|
flush status;
|
||||||
|
CREATE TABLE moocow (a int);
|
||||||
|
INSERT INTO moocow VALUES (1), (2), (3);
|
||||||
|
SHOW STATUS LIKE 'Qcache_inserts';
|
||||||
|
SELECT * FROM moocow;
|
||||||
|
SHOW STATUS LIKE 'Qcache_inserts';
|
||||||
|
SHOW STATUS LIKE 'Qcache_hits';
|
||||||
|
SELECT * FROM moocow;
|
||||||
|
SHOW STATUS LIKE 'Qcache_hits';
|
||||||
|
use test;
|
||||||
|
drop database `foo.bar`;
|
||||||
|
|
||||||
|
--echo End of 10.0 tests
|
||||||
|
|
||||||
--echo restore defaults
|
--echo restore defaults
|
||||||
SET GLOBAL query_cache_type= default;
|
SET GLOBAL query_cache_type= default;
|
||||||
SET GLOBAL query_cache_size= default;
|
SET GLOBAL query_cache_size= default;
|
||||||
|
Reference in New Issue
Block a user