1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Update of query cache code

Docs/manual.texi:
  Added information about RESET
sql/mysql_priv.h:
  Fixed wrong type
sql/sql_base.cc:
  Removed wrong info in DBUG output
sql/sql_class.cc:
  cleanup
sql/sql_parse.cc:
  Fixed wrong type
This commit is contained in:
unknown
2001-12-06 01:05:30 +02:00
parent 84788e278f
commit ff8c734864
16 changed files with 305 additions and 80 deletions

View File

@ -28,3 +28,8 @@ select * from t1;
n
345
drop table t1;
flush query cache;
reset query cache;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0

View File

@ -0,0 +1,38 @@
reset query cache;
flush status;
drop table if exists t1;
create table t1 (a int not null);
insert into t1 values (1),(2),(3);
select * from t1;
a
1
2
3
select * from t1;
a
1
2
3
select sql_no_cache * from t1;
a
1
2
3
select length(now()) from t1;
length(now())
19
19
19
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;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0

View File

@ -66,3 +66,12 @@ connection con2;
insert into t1 values (345);
select * from t1;
drop table t1;
#
# Test that QUERY CACHE commands doesn't core dump.
# (Normally we don't have a cache active at this point)
#
flush query cache;
reset query cache;
show status like "Qcache_queries_in_cache";

View File

@ -0,0 +1 @@
--set-variable=query_cache_size=2M

View File

@ -0,0 +1,26 @@
#
# Tests with query cache
#
# Reset query cache variables.
reset query cache;
flush status;
drop table if exists t1;
create table t1 (a int not null);
insert into t1 values (1),(2),(3);
select * from t1;
select * from t1;
select sql_no_cache * from t1;
select length(now()) from t1;
# Only check the variables that are independent of the machine and startup
# options
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
drop table t1;
show status like "Qcache_queries_in_cache";