diff options
author | bell@sanja.is.com.ua <> | 2002-11-03 10:15:14 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2002-11-03 10:15:14 +0200 |
commit | 43073630790990ffd6d1b6e970f8e6d3698663ea (patch) | |
tree | feab8ca130dab7caf8716a9f1f3dac2c75847e17 /mysql-test | |
parent | e65fd5d5743a44fdc78739e58ae605788a5a263f (diff) | |
download | mariadb-git-43073630790990ffd6d1b6e970f8e6d3698663ea.tar.gz |
new innodb query cache behaviour (recommit because of problem with 4.1 repository pushing)
fixed bug in quqry cache dbd transaction processing
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/bdb_cache.result | 100 | ||||
-rw-r--r-- | mysql-test/r/innodb_cache.result | 6 | ||||
-rw-r--r-- | mysql-test/t/bdb_cache-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/bdb_cache.test | 50 |
4 files changed, 154 insertions, 3 deletions
diff --git a/mysql-test/r/bdb_cache.result b/mysql-test/r/bdb_cache.result new file mode 100644 index 00000000000..e5c6923162a --- /dev/null +++ b/mysql-test/r/bdb_cache.result @@ -0,0 +1,100 @@ +drop table if exists t1, t2, t3; +flush status; +set autocommit=0; +create table t1 (a int not null) type=bdb; +insert into t1 values (1),(2),(3); +select * from t1; +a +1 +2 +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +drop table t1; +commit; +set autocommit=1; +begin; +create table t1 (a int not null) type=bdb; +insert into t1 values (1),(2),(3); +select * from t1; +a +1 +2 +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +drop table t1; +commit; +create table t1 (a int not null) type=bdb; +create table t2 (a int not null) type=bdb; +create table t3 (a int not null) type=bdb; +insert into t1 values (1),(2); +insert into t2 values (1),(2); +insert into t3 values (1),(2); +select * from t1; +a +1 +2 +select * from t2; +a +1 +2 +select * from t3; +a +1 +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +begin; +select * from t1; +a +1 +2 +select * from t2; +a +1 +2 +select * from t3; +a +1 +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +insert into t1 values (3); +insert into t2 values (3); +insert into t1 values (4); +select * from t1; +a +1 +2 +3 +4 +select * from t2; +a +1 +2 +3 +select * from t3; +a +1 +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +commit; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 diff --git a/mysql-test/r/innodb_cache.result b/mysql-test/r/innodb_cache.result index eaa030046da..6c79c2c7b34 100644 --- a/mysql-test/r/innodb_cache.result +++ b/mysql-test/r/innodb_cache.result @@ -10,7 +10,7 @@ a 3 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 1 drop table t1; commit; set autocommit=1; @@ -24,7 +24,7 @@ a 3 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 1 drop table t1; commit; create table t1 (a int not null) type=innodb; @@ -97,4 +97,4 @@ Qcache_hits 0 commit; show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 1 +Qcache_queries_in_cache 3 diff --git a/mysql-test/t/bdb_cache-master.opt b/mysql-test/t/bdb_cache-master.opt new file mode 100644 index 00000000000..5f0ebff98f6 --- /dev/null +++ b/mysql-test/t/bdb_cache-master.opt @@ -0,0 +1 @@ +--set-variable=query_cache_size=1M diff --git a/mysql-test/t/bdb_cache.test b/mysql-test/t/bdb_cache.test new file mode 100644 index 00000000000..aa5572886c5 --- /dev/null +++ b/mysql-test/t/bdb_cache.test @@ -0,0 +1,50 @@ +-- source include/have_bdb.inc +-- source include/have_query_cache.inc + +# +# Without auto_commit. +# +drop table if exists t1, t2, t3; +flush status; +set autocommit=0; +create table t1 (a int not null) type=bdb; +insert into t1 values (1),(2),(3); +select * from t1; +show status like "Qcache_queries_in_cache"; +drop table t1; +commit; +set autocommit=1; +begin; +create table t1 (a int not null) type=bdb; +insert into t1 values (1),(2),(3); +select * from t1; +show status like "Qcache_queries_in_cache"; +drop table t1; +commit; +create table t1 (a int not null) type=bdb; +create table t2 (a int not null) type=bdb; +create table t3 (a int not null) type=bdb; +insert into t1 values (1),(2); +insert into t2 values (1),(2); +insert into t3 values (1),(2); +select * from t1; +select * from t2; +select * from t3; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; +begin; +select * from t1; +select * from t2; +select * from t3; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; +insert into t1 values (3); +insert into t2 values (3); +insert into t1 values (4); +select * from t1; +select * from t2; +select * from t3; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; +commit; +show status like "Qcache_queries_in_cache";
\ No newline at end of file |