diff options
author | unknown <bell@sanja.is.com.ua> | 2004-11-25 19:49:50 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-11-25 19:49:50 +0200 |
commit | 93191c739e8302c312d283169c736867cf8327b3 (patch) | |
tree | f6eff6e65503b4149f17a6775827aa490d4780fd /mysql-test/t/ndb_cache.test | |
parent | 92882749589a2d3353119fb5fed7299b62d2f8e9 (diff) | |
download | mariadb-git-93191c739e8302c312d283169c736867cf8327b3.tar.gz |
new NDB test with QC
sql/sql_cache.cc:
if we removed old values in cache, then we can cache new one
Diffstat (limited to 'mysql-test/t/ndb_cache.test')
-rw-r--r-- | mysql-test/t/ndb_cache.test | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/mysql-test/t/ndb_cache.test b/mysql-test/t/ndb_cache.test index abd09424f64..bd368105a84 100644 --- a/mysql-test/t/ndb_cache.test +++ b/mysql-test/t/ndb_cache.test @@ -1,31 +1,49 @@ -- source include/have_query_cache.inc -- source include/have_ndb.inc - +set GLOBAL ndb_query_cache_type=on; +# following line have to be removed when ndb_query_cache_type will made +# global only +set ndb_query_cache_type=on; set GLOBAL query_cache_size=1355776; reset query cache; flush status; --disable_warnings -drop table if exists t1,t2; +drop table if exists t1; --enable_warnings CREATE TABLE t1 (a int) ENGINE=ndbcluster; -CREATE TABLE t2 (a int); - +insert into t1 value (2); +select * from t1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connect (con1,localhost,root,,); +connection con1; +use test; +set autocommit=0; +update t1 set a=3; +connect (con2,localhost,root,,); +connection con2; +select * from t1; select * from t1; show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; show status like "Qcache_hits"; -select * from t2; +connection con1; +select * from t1; +select * from t1; show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; show status like "Qcache_hits"; +commit; +connection con2; +select * from t1; select * from t1; -select * from t2; show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; show status like "Qcache_hits"; +drop table t1; -drop table t1, t2; SET GLOBAL query_cache_size=0; |