mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
We should skip beggining '(' characters when test query on possibility
to be in the query cache. (BUG#14652)
mysql-test/r/query_cache.result:
BUG#14652 test suite.
mysql-test/t/query_cache.test:
BUG#14652 test suite.
sql/sql_cache.cc:
We should skip beggining '(' characters when test query on possibility
to be in the query cache.
This commit is contained in:
@@ -982,4 +982,29 @@ show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 1
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
flush status;
|
||||
(select a from t1) union (select a from t1);
|
||||
a
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 1
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 0
|
||||
(select a from t1) union (select a from t1);
|
||||
a
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 1
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 1
|
||||
drop table t1;
|
||||
set GLOBAL query_cache_size=0;
|
||||
|
||||
@@ -712,6 +712,21 @@ show status like "Qcache_inserts";
|
||||
show status like "Qcache_hits";
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#14652: Queries with leading '(' characters.
|
||||
#
|
||||
create table t1 (a int);
|
||||
flush status;
|
||||
(select a from t1) union (select a from t1);
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_inserts";
|
||||
show status like "Qcache_hits";
|
||||
(select a from t1) union (select a from t1);
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_inserts";
|
||||
show status like "Qcache_hits";
|
||||
drop table t1;
|
||||
|
||||
set GLOBAL query_cache_size=0;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
Reference in New Issue
Block a user