Commit c2c21737 authored by Monty's avatar Monty

Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext

parents 16cd55a3 6f28f784
...@@ -3030,7 +3030,7 @@ xb_validate_name( ...@@ -3030,7 +3030,7 @@ xb_validate_name(
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
p = strpbrk(name, "/\\~"); p = strpbrk(name, "/\\~");
if (p && p - name < NAME_LEN) { if (p && (uint) (p - name) < NAME_LEN) {
msg("mariabackup: name `%s` is not valid.\n", name); msg("mariabackup: name `%s` is not valid.\n", name);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
......
...@@ -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;
......
...@@ -7,12 +7,14 @@ ...@@ -7,12 +7,14 @@
# #
replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR; replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR;
--disable_warnings
eval create table t1 ( c1 int, c2 int, c3 varchar(100)) delay_key_write=1 eval create table t1 ( c1 int, c2 int, c3 varchar(100)) delay_key_write=1
partition by key(c1) ( partition by key(c1) (
partition p01 data directory = '$MYSQL_TMP_DIR' partition p01 data directory = '$MYSQL_TMP_DIR'
index directory = '$MYSQL_TMP_DIR', index directory = '$MYSQL_TMP_DIR',
partition p02 data directory = '$MYSQL_TMP_DIR' partition p02 data directory = '$MYSQL_TMP_DIR'
index directory = '$MYSQL_TMP_DIR'); index directory = '$MYSQL_TMP_DIR');
--enable_warnings
insert into t1 values (1, 1, repeat('a', 100)); insert into t1 values (1, 1, repeat('a', 100));
insert into t1 select rand()*1000, rand()*1000, repeat('b', 100) from t1; insert into t1 select rand()*1000, rand()*1000, repeat('b', 100) from t1;
insert into t1 select rand()*1000, rand()*1000, repeat('b', 100) from t1; insert into t1 select rand()*1000, rand()*1000, repeat('b', 100) from t1;
......
...@@ -10,13 +10,19 @@ SET NAMES latin1; ...@@ -10,13 +10,19 @@ SET NAMES latin1;
CREATE TABLE `tё` (`tё` INT); CREATE TABLE `tё` (`tё` INT);
CREATE VIEW `vё` AS SELECT 'vё'; CREATE VIEW `vё` AS SELECT 'vё';
CREATE PROCEDURE `pё`() SELECT 'pё'; CREATE PROCEDURE `pё`() SELECT 'pё';
select hex(table_name) from information_schema.tables where table_schema="test" and table_name like "t%";
hex(table_name)
74C391E28098
select hex(table_name) from information_schema.tables where table_schema="test" and table_name like "v%";
hex(table_name)
76C391E28098
connection slave; connection slave;
SHOW TABLES LIKE 't%'; select hex(table_name) from information_schema.tables where table_schema="test" and table_name like "t%";
Tables_in_test (t%) hex(table_name)
74C391E28098
SHOW TABLES LIKE 'v%'; select hex(table_name) from information_schema.tables where table_schema="test" and table_name like "v%";
Tables_in_test (v%) hex(table_name)
76C391E28098
SHOW PROCEDURE STATUS LIKE 'p%'; SHOW PROCEDURE STATUS LIKE 'p%';
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
test pё PROCEDURE root@localhost ts ts DEFINER latin1 latin1_swedish_ci latin1_swedish_ci test pё PROCEDURE root@localhost ts ts DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
......
--source include/have_lowercase0.inc
--disable_warnings --disable_warnings
--source include/master-slave.inc --source include/master-slave.inc
--enable_warnings --enable_warnings
...@@ -25,9 +26,12 @@ CREATE TABLE `tё` (`tё` INT); ...@@ -25,9 +26,12 @@ CREATE TABLE `tё` (`tё` INT);
CREATE VIEW `vё` AS SELECT 'vё'; CREATE VIEW `vё` AS SELECT 'vё';
CREATE PROCEDURE `pё`() SELECT 'pё'; CREATE PROCEDURE `pё`() SELECT 'pё';
select hex(table_name) from information_schema.tables where table_schema="test" and table_name like "t%";
select hex(table_name) from information_schema.tables where table_schema="test" and table_name like "v%";
--sync_slave_with_master --sync_slave_with_master
SHOW TABLES LIKE 't%'; select hex(table_name) from information_schema.tables where table_schema="test" and table_name like "t%";
SHOW TABLES LIKE 'v%'; select hex(table_name) from information_schema.tables where table_schema="test" and table_name like "v%";
--replace_column 5 ts 6 ts --replace_column 5 ts 6 ts
SHOW PROCEDURE STATUS LIKE 'p%'; SHOW PROCEDURE STATUS LIKE 'p%';
......
...@@ -6,6 +6,7 @@ endif() ...@@ -6,6 +6,7 @@ endif()
SET(ROCKSDB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb) SET(ROCKSDB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${ROCKSDB_SOURCE_DIR} ${ROCKSDB_SOURCE_DIR}
${ROCKSDB_SOURCE_DIR}/include ${ROCKSDB_SOURCE_DIR}/include
${ROCKSDB_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src ${ROCKSDB_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src
......
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