Commit 6f28f784 authored by Monty's avatar Monty

More output in galera.query_cache.test

This is to be able to better track where things goes wrong
parent 83a8b0e9
...@@ -820,6 +820,9 @@ Qcache_queries_in_cache 1 ...@@ -820,6 +820,9 @@ Qcache_queries_in_cache 1
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 9 Qcache_hits 9
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 21
insert delayed into t1 values (4); insert delayed into t1 values (4);
select a from t1; select a from t1;
a a
...@@ -870,6 +873,9 @@ Qcache_queries_in_cache 0 ...@@ -870,6 +873,9 @@ Qcache_queries_in_cache 0
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 9 Qcache_hits 9
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 22
# On node-2 # On node-2
connection node_2; connection node_2;
show global variables like "query_cache_min_res_unit"; show global variables like "query_cache_min_res_unit";
...@@ -916,12 +922,15 @@ a ...@@ -916,12 +922,15 @@ a
1 1
2 2
3 3
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 11 Qcache_hits 11
show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 2 Qcache_inserts 24
# On node-2 # On node-2
connection node_2; connection node_2;
select * from t1; select * from t1;
...@@ -944,12 +953,12 @@ a ...@@ -944,12 +953,12 @@ a
1 1
2 2
3 3
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 10
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 2 Qcache_queries_in_cache 2
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 10
drop table t1; drop table t1;
select a from t2; select a from t2;
a a
...@@ -961,12 +970,15 @@ a ...@@ -961,12 +970,15 @@ a
1 1
2 2
3 3
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 11 Qcache_hits 11
show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 2 Qcache_inserts 18
set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_min_res_unit=default;
show global variables like "query_cache_min_res_unit"; show global variables like "query_cache_min_res_unit";
Variable_name Value Variable_name Value
...@@ -983,12 +995,15 @@ a ...@@ -983,12 +995,15 @@ a
1 1
2 2
3 3
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 2 Qcache_inserts 25
drop table t2; drop table t2;
set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_min_res_unit=default;
show global variables like "query_cache_min_res_unit"; show global variables like "query_cache_min_res_unit";
...@@ -1010,6 +1025,9 @@ Qcache_queries_in_cache 2 ...@@ -1010,6 +1025,9 @@ Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 27
# On node-2 # On node-2
connection node_2; connection node_2;
select "aaa" from t1; select "aaa" from t1;
...@@ -1024,6 +1042,9 @@ Qcache_queries_in_cache 2 ...@@ -1024,6 +1042,9 @@ Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 11 Qcache_hits 11
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 20
drop table t1; drop table t1;
# On node-1 # On node-1
connection node_1; connection node_1;
...@@ -1322,6 +1343,9 @@ select count(*) from t1; ...@@ -1322,6 +1343,9 @@ select count(*) from t1;
count(*) count(*)
140 140
drop table t1; drop table t1;
#
# INTO OUTFILE/DUMPFILE test
#
# On node-1 # On node-1
connection node_1; connection node_1;
create table t1 (a int) engine=innodb; create table t1 (a int) engine=innodb;
...@@ -1342,7 +1366,13 @@ Qcache_queries_in_cache 0 ...@@ -1342,7 +1366,13 @@ Qcache_queries_in_cache 0
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 36
drop table t1; drop table t1;
#
# Test of SQL_SELECT_LIMIT
#
# On node-1 # On node-1
connection node_1; connection node_1;
create table t1 (a int) engine=innodb; create table t1 (a int) engine=innodb;
...@@ -1367,6 +1397,9 @@ Qcache_queries_in_cache 2 ...@@ -1367,6 +1397,9 @@ Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 38
SET SQL_SELECT_LIMIT=DEFAULT; SET SQL_SELECT_LIMIT=DEFAULT;
# On node-2 # On node-2
connection node_2; connection node_2;
...@@ -1392,6 +1425,9 @@ Variable_name Value ...@@ -1392,6 +1425,9 @@ Variable_name Value
Qcache_hits 11 Qcache_hits 11
SET SQL_SELECT_LIMIT=DEFAULT; SET SQL_SELECT_LIMIT=DEFAULT;
drop table t1; drop table t1;
#
# WRITE LOCK & QC
#
# On node-1 # On node-1
connection node_1; connection node_1;
create table t1 (a int not null) engine=innodb; create table t1 (a int not null) engine=innodb;
...@@ -1408,6 +1444,9 @@ Qcache_queries_in_cache 2 ...@@ -1408,6 +1444,9 @@ Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 40
lock table t1 write, t2 read; lock table t1 write, t2 read;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
Variable_name Value Variable_name Value
...@@ -1431,6 +1470,9 @@ Qcache_queries_in_cache 2 ...@@ -1431,6 +1470,9 @@ Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 41
unlock table; unlock table;
drop view v1; drop view v1;
set query_cache_wlock_invalidate=default; set query_cache_wlock_invalidate=default;
...@@ -1471,10 +1513,16 @@ Qcache_queries_in_cache 2 ...@@ -1471,10 +1513,16 @@ Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 11 Qcache_hits 11
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 34
unlock table; unlock table;
drop view v1; drop view v1;
set query_cache_wlock_invalidate=default; set query_cache_wlock_invalidate=default;
drop table t1,t2; drop table t1,t2;
#
# Hiding real table stored in query cache by temporary table
#
# On node-1 # On node-1
connection node_1; connection node_1;
create table t1 (id int primary key) engine=innodb; create table t1 (id int primary key) engine=innodb;
...@@ -1498,92 +1546,119 @@ SELECT a,'Â','â'='Â' FROM t1; ...@@ -1498,92 +1546,119 @@ SELECT a,'Â','â'='Â' FROM t1;
a  'â'='Â' a  'â'='Â'
 0  0
 0  0
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 1 Qcache_inserts 43
set collation_connection=koi8r_bin; set collation_connection=koi8r_bin;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
a  'â'='Â' a  'â'='Â'
 0  0
 0  0
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 2 Qcache_inserts 44
set character_set_client=cp1251; set character_set_client=cp1251;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
a ? '?'='?' a ? '?'='?'
? 1 ? 1
? 1 ? 1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 3
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 3 Qcache_inserts 45
set character_set_results=cp1251; set character_set_results=cp1251;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
a ? 'â'='Â' a ? 'â'='Â'
? 1 ? 1
? 1 ? 1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 4
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 4 Qcache_inserts 46
SET NAMES default; SET NAMES default;
# On node-2 # On node-2
connection node_2; connection node_2;
#
# Run select
#
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
a  'â'='Â' a  'â'='Â'
? Â 0 ? Â 0
? Â 0 ? Â 0
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 11
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 1 Qcache_queries_in_cache 1
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 11
set collation_connection=koi8r_bin; set collation_connection=koi8r_bin;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
a ?? 'â'='Â' a ?? 'â'='Â'
? ?? 1 ? ?? 1
? ?? 1 ? ?? 1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 11 Qcache_hits 11
show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 2 Qcache_inserts 36
set character_set_client=cp1251; set character_set_client=cp1251;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
a ?? '??'='?' a ?? '??'='?'
? ?? 1 ? ?? 1
? ?? 1 ? ?? 1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 3
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 11 Qcache_hits 11
show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 3 Qcache_inserts 37
set character_set_results=cp1251; set character_set_results=cp1251;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
a ? 'â'='Â' a ? 'â'='Â'
? 1 ? 1
? 1 ? 1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 4
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 11 Qcache_hits 11
show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 4 Qcache_inserts 38
drop table t1; drop table t1;
#
# Comments before command
#
# On node-1 # On node-1
connection node_1; connection node_1;
create table t1 (a int) engine=innodb; create table t1 (a int) engine=innodb;
...@@ -1634,6 +1709,9 @@ show status like "Qcache_hits"; ...@@ -1634,6 +1709,9 @@ show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 12 Qcache_hits 12
drop table t1; drop table t1;
#
# Information schema & query cache test
#
# On node-1 # On node-1
connection node_1; connection node_1;
set session query_cache_type = 2; set session query_cache_type = 2;
......
...@@ -448,6 +448,7 @@ select * from t1; ...@@ -448,6 +448,7 @@ select * from t1;
select * from t1; select * from t1;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_inserts";
insert delayed into t1 values (4); insert delayed into t1 values (4);
--sleep 5 # Wait for insert delayed to be executed. --sleep 5 # Wait for insert delayed to be executed.
select a from t1; select a from t1;
...@@ -474,6 +475,7 @@ show status like "Qcache_hits"; ...@@ -474,6 +475,7 @@ show status like "Qcache_hits";
--connection node_1 --connection node_1
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_inserts";
# #
# Test of min result data unit size changing # Test of min result data unit size changing
...@@ -497,8 +499,9 @@ select * from t1; ...@@ -497,8 +499,9 @@ select * from t1;
select * from t1; select * from t1;
select * from t2; select * from t2;
select * from t2; select * from t2;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_inserts";
--echo # On node-2 --echo # On node-2
--connection node_2 --connection node_2
...@@ -506,13 +509,14 @@ select * from t1; ...@@ -506,13 +509,14 @@ select * from t1;
select * from t1; select * from t1;
select * from t2; select * from t2;
select * from t2; select * from t2;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
drop table t1; drop table t1;
select a from t2; select a from t2;
select a from t2; select a from t2;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_inserts";
set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_min_res_unit=default;
show global variables like "query_cache_min_res_unit"; show global variables like "query_cache_min_res_unit";
...@@ -520,8 +524,9 @@ show global variables like "query_cache_min_res_unit"; ...@@ -520,8 +524,9 @@ show global variables like "query_cache_min_res_unit";
--connection node_1 --connection node_1
select a from t2; select a from t2;
select a from t2; select a from t2;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_inserts";
drop table t2; drop table t2;
set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_min_res_unit=default;
show global variables like "query_cache_min_res_unit"; show global variables like "query_cache_min_res_unit";
...@@ -537,6 +542,7 @@ select "aaa" from t1; ...@@ -537,6 +542,7 @@ select "aaa" from t1;
select "AAA" from t1; select "AAA" from t1;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_inserts";
--echo # On node-2 --echo # On node-2
--connection node_2 --connection node_2
...@@ -544,6 +550,7 @@ select "aaa" from t1; ...@@ -544,6 +550,7 @@ select "aaa" from t1;
select "AAA" from t1; select "AAA" from t1;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_inserts";
drop table t1; drop table t1;
# #
...@@ -728,9 +735,9 @@ select count(*) from t1; ...@@ -728,9 +735,9 @@ select count(*) from t1;
drop table t1; drop table t1;
# --echo #
# INTO OUTFILE/DUMPFILE test --echo # INTO OUTFILE/DUMPFILE test
# --echo #
--echo # On node-1 --echo # On node-1
--connection node_1 --connection node_1
create table t1 (a int) engine=innodb; create table t1 (a int) engine=innodb;
...@@ -743,14 +750,15 @@ select * from t1 into outfile "query_cache.out.file"; ...@@ -743,14 +750,15 @@ select * from t1 into outfile "query_cache.out.file";
select * from t1 limit 1 into dumpfile "query_cache.dump.file"; select * from t1 limit 1 into dumpfile "query_cache.dump.file";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_inserts";
drop table t1; drop table t1;
let $datadir=`select @@datadir`; let $datadir=`select @@datadir`;
--remove_file $datadir/test/query_cache.dump.file --remove_file $datadir/test/query_cache.dump.file
--remove_file $datadir/test/query_cache.out.file --remove_file $datadir/test/query_cache.out.file
# --echo #
# Test of SQL_SELECT_LIMIT --echo # Test of SQL_SELECT_LIMIT
# --echo #
--echo # On node-1 --echo # On node-1
--connection node_1 --connection node_1
create table t1 (a int) engine=innodb; create table t1 (a int) engine=innodb;
...@@ -762,6 +770,7 @@ SET SQL_SELECT_LIMIT=1; ...@@ -762,6 +770,7 @@ SET SQL_SELECT_LIMIT=1;
select * from t1; select * from t1;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_inserts";
SET SQL_SELECT_LIMIT=DEFAULT; SET SQL_SELECT_LIMIT=DEFAULT;
--echo # On node-2 --echo # On node-2
...@@ -777,9 +786,9 @@ SET SQL_SELECT_LIMIT=DEFAULT; ...@@ -777,9 +786,9 @@ SET SQL_SELECT_LIMIT=DEFAULT;
drop table t1; drop table t1;
# --echo #
# WRITE LOCK & QC --echo # WRITE LOCK & QC
# --echo #
--echo # On node-1 --echo # On node-1
--connection node_1 --connection node_1
create table t1 (a int not null) engine=innodb; create table t1 (a int not null) engine=innodb;
...@@ -791,6 +800,7 @@ select * from t1; ...@@ -791,6 +800,7 @@ select * from t1;
select * from t2; select * from t2;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_inserts";
lock table t1 write, t2 read; lock table t1 write, t2 read;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
...@@ -802,6 +812,7 @@ show status like "Qcache_hits"; ...@@ -802,6 +812,7 @@ show status like "Qcache_hits";
lock table v1 write; lock table v1 write;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_inserts";
unlock table; unlock table;
drop view v1; drop view v1;
set query_cache_wlock_invalidate=default; set query_cache_wlock_invalidate=default;
...@@ -825,15 +836,16 @@ show status like "Qcache_hits"; ...@@ -825,15 +836,16 @@ show status like "Qcache_hits";
lock table v1 write; lock table v1 write;
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits"; show status like "Qcache_hits";
show status like "Qcache_inserts";
unlock table; unlock table;
drop view v1; drop view v1;
set query_cache_wlock_invalidate=default; set query_cache_wlock_invalidate=default;
drop table t1,t2; drop table t1,t2;
# --echo #
# Hiding real table stored in query cache by temporary table --echo # Hiding real table stored in query cache by temporary table
# --echo #
--echo # On node-1 --echo # On node-1
--connection node_1 --connection node_1
create table t1 (id int primary key) engine=innodb; create table t1 (id int primary key) engine=innodb;
...@@ -866,66 +878,76 @@ INSERT INTO t1 VALUES (_koi8r 0xc3),(_koi8r 0xc3); ...@@ -866,66 +878,76 @@ INSERT INTO t1 VALUES (_koi8r 0xc3),(_koi8r 0xc3);
# Run select # Run select
# #
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_inserts";
# #
# Change collation_connection and run the same query again # Change collation_connection and run the same query again
# #
set collation_connection=koi8r_bin; set collation_connection=koi8r_bin;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_inserts";
# #
# Now change character_set_client and run the same query again # Now change character_set_client and run the same query again
# #
set character_set_client=cp1251; set character_set_client=cp1251;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_inserts";
# #
# And finally change character_set_results and run the same query again # And finally change character_set_results and run the same query again
# #
set character_set_results=cp1251; set character_set_results=cp1251;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_inserts";
SET NAMES default; SET NAMES default;
--echo # On node-2 --echo # On node-2
--connection node_2 --connection node_2
#
# Run select --echo #
# --echo # Run select
--echo #
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
# #
# Change collation_connection and run the same query again # Change collation_connection and run the same query again
# #
set collation_connection=koi8r_bin; set collation_connection=koi8r_bin;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_inserts";
# #
# Now change character_set_client and run the same query again # Now change character_set_client and run the same query again
# #
set character_set_client=cp1251; set character_set_client=cp1251;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_inserts";
# #
# And finally change character_set_results and run the same query again # And finally change character_set_results and run the same query again
# #
set character_set_results=cp1251; set character_set_results=cp1251;
SELECT a,'Â','â'='Â' FROM t1; SELECT a,'Â','â'='Â' FROM t1;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_inserts";
drop table t1; drop table t1;
# --echo #
# Comments before command --echo # Comments before command
# --echo #
--echo # On node-1 --echo # On node-1
--connection node_1 --connection node_1
create table t1 (a int) engine=innodb; create table t1 (a int) engine=innodb;
...@@ -951,9 +973,10 @@ show status like "Qcache_hits"; ...@@ -951,9 +973,10 @@ show status like "Qcache_hits";
drop table t1; drop table t1;
# --echo #
# Information schema & query cache test --echo # Information schema & query cache test
# --echo #
--echo # On node-1 --echo # On node-1
--connection node_1 --connection node_1
set session query_cache_type = 2; set session query_cache_type = 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment