mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge tulin@bk-internal.mysql.com:/tmp/mysql-4.1-ndbqc
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-qc sql/sql_cache.cc: Auto merged
This commit is contained in:
@ -1,43 +0,0 @@
|
||||
set GLOBAL query_cache_size=1355776;
|
||||
reset query cache;
|
||||
flush status;
|
||||
drop table if exists t1,t2;
|
||||
CREATE TABLE t1 (a int) ENGINE=ndbcluster;
|
||||
CREATE TABLE t2 (a int);
|
||||
select * from t1;
|
||||
a
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 0
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 0
|
||||
select * from t2;
|
||||
a
|
||||
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 0
|
||||
select * from t1;
|
||||
a
|
||||
select * from t2;
|
||||
a
|
||||
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, t2;
|
||||
SET GLOBAL query_cache_size=0;
|
||||
|
@ -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";
|
||||
select * from t2;
|
||||
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;
|
||||
select * from t2;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_inserts";
|
||||
show status like "Qcache_hits";
|
||||
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;
|
||||
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;
|
||||
|
Reference in New Issue
Block a user