diff options
author | unknown <sanja@askmonty.org> | 2013-10-17 19:01:57 +0300 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2013-10-17 19:01:57 +0300 |
commit | 8f4eb208d2988354f34b9a99e500c5c82d86ffbd (patch) | |
tree | cfdf6b4ff5ab81a85cfaff5580d22b3d646cc324 /mysql-test/r/query_cache.result | |
parent | d21f9bab3391e7fb0913d14cd77cb2832475927e (diff) | |
parent | b88bf50ec138fbe3844a5859d884347c413dbf0d (diff) | |
download | mariadb-git-8f4eb208d2988354f34b9a99e500c5c82d86ffbd.tar.gz |
merge 10.0-base -> 10.0
Diffstat (limited to 'mysql-test/r/query_cache.result')
-rw-r--r-- | mysql-test/r/query_cache.result | 148 |
1 files changed, 146 insertions, 2 deletions
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 18f9db1743d..118c6785136 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1933,6 +1933,152 @@ select @@query_cache_size, @@global.query_cache_type, @@local.query_cache_type; @@query_cache_size @@global.query_cache_type @@local.query_cache_type 20971520 ON ON # +# MDEV-4981: Account for queries handled by query-cache in +# USER_STATISTICS (and in HOST_STATISTICS) +# +SET GLOBAL userstat=1; +set GLOBAL query_cache_size=1355776; +FLUSH USER_STATISTICS; +FLUSH CLIENT_STATISTICS; +reset query cache; +flush status; +create table t1 (a int); +insert into t1 values (1); +select * from t1; +a +1 +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS +where CLIENT="localhost"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +1 1 0 +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS +where USER="root"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +2 2 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +1 +select * from t1; +a +1 +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS +where CLIENT="localhost"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +5 5 0 +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS +where USER="root"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +6 6 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +drop table t1; +FLUSH USER_STATISTICS; +FLUSH CLIENT_STATISTICS; +flush status; +create table t1 (a int); +select * from t1; +a +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS +where CLIENT="localhost"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +1 0 1 +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS +where USER="root"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +2 1 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +select * from t1; +a +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS +where CLIENT="localhost"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +5 2 3 +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS +where USER="root"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +6 3 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +FLUSH USER_STATISTICS; +FLUSH CLIENT_STATISTICS; +flush status; +create procedure p1() +select * from t1; +call p1; +a +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS +where CLIENT="localhost"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +1 0 1 +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS +where USER="root"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +2 1 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +call p1; +a +call p1; +a +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS +where CLIENT="localhost"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +5 2 3 +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS +where USER="root"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +6 3 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +FLUSH USER_STATISTICS; +FLUSH CLIENT_STATISTICS; +flush status; +SET GLOBAL query_cache_size= 0; +call p1; +a +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS +where CLIENT="localhost"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +1 0 1 +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS +where USER="root"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +2 1 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +call p1; +a +call p1; +a +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.CLIENT_STATISTICS +where CLIENT="localhost"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +5 2 3 +select SELECT_COMMANDS,ROWS_SENT,EMPTY_QUERIES from INFORMATION_SCHEMA.USER_STATISTICS +where USER="root"; +SELECT_COMMANDS ROWS_SENT EMPTY_QUERIES +6 3 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +drop procedure p1; +drop table t1; +set GLOBAL query_cache_size=1355776; +SET GLOBAL userstat=default; +End of 5.5 tests +# # Bug#12977203: SERVER CRASH ON A DERIVED TABLE WITH QUERY CACHE ENABLED # SET @qc= @@query_cache_size; @@ -1944,8 +2090,6 @@ COUNT(*) DROP TABLE t1; 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 # |