summaryrefslogtreecommitdiff
path: root/mysql-test/t/query_cache.test
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-10-24 11:36:29 +0500
committerunknown <ramil@mysql.com>2005-10-24 11:36:29 +0500
commit39af58dbd46636bf4d5bcdda56a090905f740ad7 (patch)
tree619517758503f7aaf39c2b8b7a147627ef05ce4a /mysql-test/t/query_cache.test
parent811c6d216ec224a019dad5a99e356720677b6d22 (diff)
parentd29ecd5e91adf6eaeb4f2afef0db30648fe08065 (diff)
downloadmariadb-git-39af58dbd46636bf4d5bcdda56a090905f740ad7.tar.gz
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.b10303 mysql-test/r/query_cache.result: Auto merged mysql-test/t/query_cache.test: Auto merged sql/sql_cache.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'mysql-test/t/query_cache.test')
-rw-r--r--mysql-test/t/query_cache.test42
1 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index db759fcbac3..646151a5aae 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -776,6 +776,7 @@ delimiter ;//
#
# query in QC from normal execution and SP (BUG#6897)
+# improved to also test BUG#3583 and BUG#12990
#
flush query cache;
reset query cache;
@@ -785,6 +786,22 @@ create table t1 (s1 int)//
create procedure f1 () begin
select sql_cache * from t1;
select sql_cache * from t1;
+select sql_cache * from t1;
+end;//
+create procedure f2 () begin
+select sql_cache * from t1 where s1=1;
+select sql_cache * from t1;
+end;//
+create procedure f3 () begin
+select sql_cache * from t1;
+select sql_cache * from t1 where s1=1;
+end;//
+create procedure f4 () begin
+select sql_cache * from t1;
+select sql_cache * from t1 where s1=1;
+select sql_cache * from t1;
+select sql_cache * from t1 where s1=1;
+select sql_cache * from t1 where s1=1;
end;//
delimiter ;//
call f1();
@@ -811,7 +828,32 @@ select sql_cache * from t1;
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
+flush query cache;
+reset query cache;
+flush status;
+select sql_cache * from t1;
+select sql_cache * from t1 where s1=1;
+call f1();
+call f2();
+call f3();
+call f4();
+call f4();
+call f3();
+call f2();
+select sql_cache * from t1 where s1=1;
+insert into t1 values (2);
+call f1();
+select sql_cache * from t1 where s1=1;
+select sql_cache * from t1;
+call f1();
+call f3();
+call f3();
+call f1();
+
drop procedure f1;
+drop procedure f2;
+drop procedure f3;
+drop procedure f4;
drop table t1;
set GLOBAL query_cache_size=0;