diff options
author | unknown <bell@sanja.is.com.ua> | 2005-07-05 11:38:05 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-07-05 11:38:05 +0300 |
commit | 0ace9cefcd0e530411387ae775f9a08d9b529254 (patch) | |
tree | f76cced6c273267787992bca7b5d9fcdd8f287ef /mysql-test/t/query_cache.test | |
parent | c6c905f773d83b73f7e9ded2a2251fd3f7f04363 (diff) | |
parent | a559967d51926fda2df3e6440501ab789486021f (diff) | |
download | mariadb-git-0ace9cefcd0e530411387ae775f9a08d9b529254.tar.gz |
merge
Diffstat (limited to 'mysql-test/t/query_cache.test')
-rw-r--r-- | mysql-test/t/query_cache.test | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 88891bd3881..3a0ac08b1ba 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -757,6 +757,50 @@ flush query cache; drop table t1, t2; # +# Query with warning prohibited to query cache (BUG#9414) +# +flush status; +CREATE TABLE t1 ( + `date` datetime NOT NULL default '0000-00-00 00:00:00', + KEY `date` (`date`) +) ENGINE=MyISAM; + +INSERT INTO t1 VALUES ('20050326'); +INSERT INTO t1 VALUES ('20050325'); +SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0'; +SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 0:0:0'; +SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0'; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +drop table t1; + +# +# queries with subquery in the FROM clause (BUG#11522) +# +create table t1 (a int); +insert into t1 values (1); +reset query cache; +flush status; +select * from (select * from t1) a; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from (select * from t1) a; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +insert into t1 values (2); +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from (select * from t1) a; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +drop table t1; + +# # SP cursors and selects with query cache (BUG#9715) # create table t1 (a int); |