Commit b7fb30e9 authored by Alice Sherepa's avatar Alice Sherepa

MDEV-21360 global debug_dbug pre-test value restoration issues

parent 451573fa
...@@ -15,7 +15,7 @@ RESET MASTER; ...@@ -15,7 +15,7 @@ RESET MASTER;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb;
INSERT INTO t1 VALUES(0); INSERT INTO t1 VALUES(0);
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug='+d,fail_binlog_write_1'; SET SESSION debug_dbug='+d,fail_binlog_write_1';
--error ER_ERROR_ON_WRITE --error ER_ERROR_ON_WRITE
INSERT INTO t1 VALUES(1); INSERT INTO t1 VALUES(1);
......
...@@ -133,7 +133,7 @@ set @save_dbug = @@session.debug_dbug; ...@@ -133,7 +133,7 @@ set @save_dbug = @@session.debug_dbug;
set @@session.debug_dbug='d,simulate_checksum_test_failure'; set @@session.debug_dbug='d,simulate_checksum_test_failure';
--error ER_ERROR_WHEN_EXECUTING_COMMAND --error ER_ERROR_WHEN_EXECUTING_COMMAND
show binlog events; show binlog events;
set debug_dbug= @save_dbug; SET debug_dbug= @save_dbug;
set @@global.master_verify_checksum = default; set @@global.master_verify_checksum = default;
#connection master; #connection master;
......
...@@ -4,9 +4,9 @@ drop table if exists t1; ...@@ -4,9 +4,9 @@ drop table if exists t1;
SET @old_debug= @@session.debug; SET @old_debug= @@session.debug;
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB; CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB;
CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam; CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam;
set debug_dbug='+d,send_kill_after_delete'; SET debug_dbug='+d,send_kill_after_delete';
CREATE OR REPLACE TABLE t1 LIKE tmp; CREATE OR REPLACE TABLE t1 LIKE tmp;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
SHOW TABLES; SHOW TABLES;
Tables_in_test Tables_in_test
t1 t1
......
SET @saved_dbug = @@debug_dbug; SET @saved_dbug = @@debug_dbug;
set debug_dbug='+d,unstable_db_type'; SET debug_dbug='+d,unstable_db_type';
install soname 'ha_archive'; install soname 'ha_archive';
create table t1 (a int) engine=archive; create table t1 (a int) engine=archive;
insert t1 values (1),(2),(3); insert t1 values (1),(2),(3);
...@@ -33,4 +33,4 @@ t1.frm ...@@ -33,4 +33,4 @@ t1.frm
drop table t1; drop table t1;
db.opt db.opt
uninstall soname 'ha_archive'; uninstall soname 'ha_archive';
set debug_dbug=@saved_dbug; SET debug_dbug=@saved_dbug;
create table t1 (a int, b int); create table t1 (a int, b int);
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set debug_dbug='+d,external_lock_failure'; SET debug_dbug='+d,external_lock_failure';
alter table t1 add column c int; alter table t1 add column c int;
ERROR HY000: Got error 168 'KABOOM!' from MyISAM ERROR HY000: Got error 168 'KABOOM!' from MyISAM
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
drop table t1; drop table t1;
...@@ -10,7 +10,7 @@ INSERT INTO t1 VALUES ...@@ -10,7 +10,7 @@ INSERT INTO t1 VALUES
('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'), ('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'),
('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK'); ('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK');
set tmp_table_size=1024; set tmp_table_size=1024;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,raise_error"; set session debug_dbug="+d,raise_error";
SELECT MAX(a) FROM t1 GROUP BY a,b; SELECT MAX(a) FROM t1 GROUP BY a,b;
ERROR 23000: Can't write; duplicate key in table '(temporary)' ERROR 23000: Can't write; duplicate key in table '(temporary)'
...@@ -23,7 +23,7 @@ CREATE TABLE t1 (a INT(100) NOT NULL); ...@@ -23,7 +23,7 @@ CREATE TABLE t1 (a INT(100) NOT NULL);
INSERT INTO t1 VALUES (1), (0), (2); INSERT INTO t1 VALUES (1), (0), (2);
SET SESSION debug_dbug='+d,alter_table_only_index_change'; SET SESSION debug_dbug='+d,alter_table_only_index_change';
ALTER TABLE t1 ADD INDEX a(a); ALTER TABLE t1 ADD INDEX a(a);
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -43,7 +43,7 @@ CREATE TABLE t1(a BLOB); ...@@ -43,7 +43,7 @@ CREATE TABLE t1(a BLOB);
SET SESSION debug_dbug="+d,bug42064_simulate_oom"; SET SESSION debug_dbug="+d,bug42064_simulate_oom";
INSERT INTO t1 VALUES(""); INSERT INTO t1 VALUES("");
Got one of the listed errors Got one of the listed errors
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
DROP TABLE t1; DROP TABLE t1;
# #
# Bug#41660: Sort-index_merge for non-first join table may require # Bug#41660: Sort-index_merge for non-first join table may require
...@@ -80,7 +80,7 @@ a a b filler ...@@ -80,7 +80,7 @@ a a b filler
7 1 1 data 7 1 1 data
8 1 1 data 8 1 1 data
9 1 1 data 9 1 1 data
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
SET optimizer_switch=@save_optimizer_switch; SET optimizer_switch=@save_optimizer_switch;
DROP TABLE t1, t2; DROP TABLE t1, t2;
# #
...@@ -93,7 +93,7 @@ INSERT INTO t2 VALUES (1),(2); ...@@ -93,7 +93,7 @@ INSERT INTO t2 VALUES (1),(2);
SET SESSION debug_dbug="+d,bug11747970_raise_error"; SET SESSION debug_dbug="+d,bug11747970_raise_error";
INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1); INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1);
ERROR 70100: Query execution was interrupted ERROR 70100: Query execution was interrupted
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
DROP TABLE t1,t2; DROP TABLE t1,t2;
# #
# End of 5.1 tests # End of 5.1 tests
...@@ -127,4 +127,4 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory"; ...@@ -127,4 +127,4 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory";
SELECT f1(1); SELECT f1(1);
Got one of the listed errors Got one of the listed errors
DROP FUNCTION f1; DROP FUNCTION f1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set @@debug_dbug= 'd,opt'; set @@debug_dbug= 'd,opt';
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t2 ( CREATE TABLE t2 (
...@@ -47,4 +47,4 @@ SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5; ...@@ -47,4 +47,4 @@ SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5;
pk f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f1 f2 pk f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f1 f2
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
drop view v2,v3; drop view v2,v3;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -34,10 +34,10 @@ create table t1 (a int, index(a)); ...@@ -34,10 +34,10 @@ create table t1 (a int, index(a));
lock tables t1 write; lock tables t1 write;
insert t1 values (1),(2),(1); insert t1 values (1),(2),(1);
set @old_dbug=@@debug_dbug; set @old_dbug=@@debug_dbug;
set debug_dbug='+d,mi_lock_database_failure'; SET debug_dbug='+d,mi_lock_database_failure';
unlock tables; unlock tables;
Warnings: Warnings:
Error 126 Index for table './test/t1.MYI' is corrupt; try to repair it Error 126 Index for table './test/t1.MYI' is corrupt; try to repair it
Error 1030 Got error 22 "Invalid argument" from storage engine MyISAM Error 1030 Got error 22 "Invalid argument" from storage engine MyISAM
set debug_dbug=@old_dbug; SET debug_dbug=@old_dbug;
drop table t1; drop table t1;
...@@ -70,7 +70,7 @@ key(a),key(b),key(c) ...@@ -70,7 +70,7 @@ key(a),key(b),key(c)
insert into t1 insert into t1
select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a
from t0 A, t0 B, t0 C, t0 D where D.a<5; from t0 A, t0 B, t0 C, t0 D where D.a<5;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set @@global.debug_dbug="+d,ha_index_init_fail"; set @@global.debug_dbug="+d,ha_index_init_fail";
explain select * from t1 where a=10 and b=10; explain select * from t1 where a=10 and b=10;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
...@@ -78,5 +78,5 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -78,5 +78,5 @@ id select_type table type possible_keys key key_len ref rows Extra
select * from t1 where a=10 and b=10; select * from t1 where a=10 and b=10;
ERROR HY000: Table definition has changed, please retry transaction ERROR HY000: Table definition has changed, please retry transaction
DROP TABLE t0,t1; DROP TABLE t0,t1;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
set @@optimizer_switch= @optimizer_switch_save; set @@optimizer_switch= @optimizer_switch_save;
...@@ -7,10 +7,10 @@ INSERT INTO t1 (c) SELECT c FROM t1; ...@@ -7,10 +7,10 @@ INSERT INTO t1 (c) SELECT c FROM t1;
INSERT INTO t1 (c) SELECT c FROM t1; INSERT INTO t1 (c) SELECT c FROM t1;
INSERT INTO t1 (c) SELECT c FROM t1; INSERT INTO t1 (c) SELECT c FROM t1;
set @old_dbug=@@session.debug_dbug; set @old_dbug=@@session.debug_dbug;
set debug_dbug="+d,kill_join_init_read_record"; SET debug_dbug="+d,kill_join_init_read_record";
SELECT 1 FROM t1 AS alias1, t1 AS alias2, t1 AS alias3 SELECT 1 FROM t1 AS alias1, t1 AS alias2, t1 AS alias3
WHERE alias1.c = alias2.c OR alias1.i <= 1 WHERE alias1.c = alias2.c OR alias1.i <= 1
; ;
ERROR 70100: Query execution was interrupted ERROR 70100: Query execution was interrupted
set debug_dbug=@old_dbug; SET debug_dbug=@old_dbug;
DROP TABLE t1; DROP TABLE t1;
...@@ -6,7 +6,7 @@ insert into t1 values (2,2), (1,1); ...@@ -6,7 +6,7 @@ insert into t1 values (2,2), (1,1);
create table t2 (a int); create table t2 (a int);
insert into t2 values (2), (3); insert into t2 values (2), (3);
set session join_cache_level=3; set session join_cache_level=3;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set @@debug_dbug= 'd,opt'; set @@debug_dbug= 'd,opt';
explain select t1.b from t1,t2 where t1.b=t2.a; explain select t1.b from t1,t2 where t1.b=t2.a;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
...@@ -17,4 +17,4 @@ b ...@@ -17,4 +17,4 @@ b
2 2
set session join_cache_level=default; set session join_cache_level=default;
drop table t1,t2; drop table t1,t2;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -23,7 +23,7 @@ show explain for $thr1; ...@@ -23,7 +23,7 @@ show explain for $thr1;
ERROR HY000: Target is not running an EXPLAINable command ERROR HY000: Target is not running an EXPLAINable command
connection con1; connection con1;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select count(*) from t1 where a < 100000; select count(*) from t1 where a < 100000;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -58,10 +58,10 @@ connection con1; ...@@ -58,10 +58,10 @@ connection con1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 10 Using index condition; Rowid-ordered scan 1 SIMPLE t1 range a a 5 NULL 10 Using index condition; Rowid-ordered scan
set optimizer_switch= @show_expl_tmp; set optimizer_switch= @show_expl_tmp;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# UNION, first branch # UNION, first branch
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
explain select a from t0 A union select a+1 from t0 B; explain select a from t0 A union select a+1 from t0 B;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -76,10 +76,10 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -76,10 +76,10 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY A ALL NULL NULL NULL NULL 10 1 PRIMARY A ALL NULL NULL NULL NULL 10
2 UNION B ALL NULL NULL NULL NULL 10 2 UNION B ALL NULL NULL NULL NULL 10
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# UNION, second branch # UNION, second branch
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
explain select a from t0 A union select a+1 from t0 B; explain select a from t0 A union select a+1 from t0 B;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -94,10 +94,10 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -94,10 +94,10 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY A ALL NULL NULL NULL NULL 10 1 PRIMARY A ALL NULL NULL NULL NULL 10
2 UNION B ALL NULL NULL NULL NULL 10 2 UNION B ALL NULL NULL NULL NULL 10
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# Uncorrelated subquery, select # Uncorrelated subquery, select
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select a, (select max(a) from t0 B) from t0 A where a<1; select a, (select max(a) from t0 B) from t0 A where a<1;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -109,10 +109,10 @@ Note 1003 select a, (select max(a) from t0 B) from t0 A where a<1 ...@@ -109,10 +109,10 @@ Note 1003 select a, (select max(a) from t0 B) from t0 A where a<1
connection con1; connection con1;
a (select max(a) from t0 B) a (select max(a) from t0 B)
0 9 0 9
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# Uncorrelated subquery, explain # Uncorrelated subquery, explain
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
explain select a, (select max(a) from t0 B) from t0 A where a<1; explain select a, (select max(a) from t0 B) from t0 A where a<1;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -125,10 +125,10 @@ connection con1; ...@@ -125,10 +125,10 @@ connection con1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY A ALL NULL NULL NULL NULL 10 Using where 1 PRIMARY A ALL NULL NULL NULL NULL 10 Using where
2 SUBQUERY B ALL NULL NULL NULL NULL 10 2 SUBQUERY B ALL NULL NULL NULL NULL 10
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# correlated subquery, select # correlated subquery, select
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -140,10 +140,10 @@ Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a ...@@ -140,10 +140,10 @@ Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a
connection con1; connection con1;
a (select max(a) from t0 b where b.a+a.a<10) a (select max(a) from t0 b where b.a+a.a<10)
0 9 0 9
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# correlated subquery, explain # correlated subquery, explain
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -155,10 +155,10 @@ Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a ...@@ -155,10 +155,10 @@ Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a
connection con1; connection con1;
a (select max(a) from t0 b where b.a+a.a<10) a (select max(a) from t0 b where b.a+a.a<10)
0 9 0 9
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# correlated subquery, select, while inside the subquery # correlated subquery, select, while inside the subquery
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -170,10 +170,10 @@ Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a ...@@ -170,10 +170,10 @@ Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a
connection con1; connection con1;
a (select max(a) from t0 b where b.a+a.a<10) a (select max(a) from t0 b where b.a+a.a<10)
0 9 0 9
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# correlated subquery, explain, while inside the subquery # correlated subquery, explain, while inside the subquery
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -185,10 +185,10 @@ Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a ...@@ -185,10 +185,10 @@ Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a
connection con1; connection con1;
a (select max(a) from t0 b where b.a+a.a<10) a (select max(a) from t0 b where b.a+a.a<10)
0 9 0 9
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# correlated subquery, explain, while inside the subquery # correlated subquery, explain, while inside the subquery
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -200,12 +200,12 @@ Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a ...@@ -200,12 +200,12 @@ Note 1003 select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a
connection con1; connection con1;
a (select max(a) from t0 b where b.a+a.a<10) a (select max(a) from t0 b where b.a+a.a<10)
0 9 0 9
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# Try to do SHOW EXPLAIN for a query that runs a SET command: # Try to do SHOW EXPLAIN for a query that runs a SET command:
# I've found experimentally that select_id==2 here... # I've found experimentally that select_id==2 here...
# #
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
set @foo= (select max(a) from t0 where sin(a) >0); set @foo= (select max(a) from t0 where sin(a) >0);
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -213,13 +213,13 @@ ERROR HY000: Target is not running an EXPLAINable command ...@@ -213,13 +213,13 @@ ERROR HY000: Target is not running an EXPLAINable command
kill query $thr2; kill query $thr2;
connection con1; connection con1;
ERROR 70100: Query execution was interrupted ERROR 70100: Query execution was interrupted
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# #
# Attempt SHOW EXPLAIN for an UPDATE # Attempt SHOW EXPLAIN for an UPDATE
# #
create table t2 as select a as a, a as dummy from t0 limit 2; create table t2 as select a as a, a as dummy from t0 limit 2;
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 ; update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 ;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -236,13 +236,13 @@ Warnings: ...@@ -236,13 +236,13 @@ Warnings:
Note 1003 update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 Note 1003 update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3
connection con1; connection con1;
drop table t2; drop table t2;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# #
# Attempt SHOW EXPLAIN for a DELETE (UPD: now works) # Attempt SHOW EXPLAIN for a DELETE (UPD: now works)
# #
create table t2 as select a as a, a as dummy from t0 limit 2; create table t2 as select a as a, a as dummy from t0 limit 2;
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 ; delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 ;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -259,13 +259,13 @@ Warnings: ...@@ -259,13 +259,13 @@ Warnings:
Note 1003 delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 Note 1003 delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3
connection con1; connection con1;
drop table t2; drop table t2;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# #
# Multiple SHOW EXPLAIN calls for one select # Multiple SHOW EXPLAIN calls for one select
# #
create table t2 as select a as a, a as dummy from t0 limit 3; create table t2 as select a as a, a as dummy from t0 limit 3;
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select t2.a, ((select max(a) from t0 where t2.a + t0.a <3) >3) as SUBQ from t2; select t2.a, ((select max(a) from t0 where t2.a + t0.a <3) >3) as SUBQ from t2;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -292,14 +292,14 @@ a SUBQ ...@@ -292,14 +292,14 @@ a SUBQ
1 0 1 0
2 0 2 0
drop table t2; drop table t2;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# #
# SHOW EXPLAIN for SELECT ... ORDER BY with "Using filesort" # SHOW EXPLAIN for SELECT ... ORDER BY with "Using filesort"
# #
explain select * from t0 order by a; explain select * from t0 order by a;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using filesort 1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using filesort
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
select * from t0 order by a; select * from t0 order by a;
connection default; connection default;
...@@ -320,7 +320,7 @@ a ...@@ -320,7 +320,7 @@ a
7 7
8 8
9 9
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# #
# SHOW EXPLAIN for SELECT ... with "Using temporary" # SHOW EXPLAIN for SELECT ... with "Using temporary"
# #
...@@ -329,7 +329,7 @@ explain select distinct a from t0; ...@@ -329,7 +329,7 @@ explain select distinct a from t0;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using temporary 1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using temporary
connection con1; connection con1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
select distinct a from t0; select distinct a from t0;
connection default; connection default;
...@@ -350,7 +350,7 @@ a ...@@ -350,7 +350,7 @@ a
7 7
8 8
9 9
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# #
# SHOW EXPLAIN for SELECT ... with "Using temporary; Using filesort" # SHOW EXPLAIN for SELECT ... with "Using temporary; Using filesort"
# #
...@@ -359,7 +359,7 @@ explain select distinct a from t0; ...@@ -359,7 +359,7 @@ explain select distinct a from t0;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using temporary 1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using temporary
connection con1; connection con1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
select distinct a from t0; select distinct a from t0;
connection default; connection default;
...@@ -380,7 +380,7 @@ a ...@@ -380,7 +380,7 @@ a
7 7
8 8
9 9
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# #
# MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY # MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY
# #
...@@ -390,7 +390,7 @@ explain SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; ...@@ -390,7 +390,7 @@ explain SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort 1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) 1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join)
set debug_dbug='+d,show_explain_in_find_all_keys'; SET debug_dbug='+d,show_explain_in_find_all_keys';
SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a;
connection default; connection default;
# FIXED by "conservative assumptions about when QEP is available" fix: # FIXED by "conservative assumptions about when QEP is available" fix:
...@@ -406,7 +406,7 @@ a ...@@ -406,7 +406,7 @@ a
1 1
2 2
4 4
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t2; DROP TABLE t2;
# #
# MDEV-239: Assertion `field_types == 0 ... ' failed in Protocol_text::store(double, uint32, String*) with # MDEV-239: Assertion `field_types == 0 ... ' failed in Protocol_text::store(double, uint32, String*) with
...@@ -421,7 +421,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra ...@@ -421,7 +421,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings: Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` join `test`.`t2` group by `test`.`t2`.`a` Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` join `test`.`t2` group by `test`.`t2`.`a`
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -436,7 +436,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra ...@@ -436,7 +436,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join) 1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join)
Warnings: Warnings:
Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` join `test`.`t2` group by `test`.`t2`.`a` Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` join `test`.`t2` group by `test`.`t2`.`a`
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t2; DROP TABLE t2;
# #
# MDEV-240: SHOW EXPLAIN: Assertion `this->optimized == 2' failed in # MDEV-240: SHOW EXPLAIN: Assertion `this->optimized == 2' failed in
...@@ -453,7 +453,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -453,7 +453,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 6 1 PRIMARY t2 ALL NULL NULL NULL NULL 6
2 DERIVED t3 system NULL NULL NULL NULL 1 2 DERIVED t3 system NULL NULL NULL NULL 1
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
SELECT * FROM v1, t2; SELECT * FROM v1, t2;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -461,14 +461,14 @@ ERROR HY000: Target is not running an EXPLAINable command ...@@ -461,14 +461,14 @@ ERROR HY000: Target is not running an EXPLAINable command
kill query $thr2; kill query $thr2;
connection con1; connection con1;
ERROR 70100: Query execution was interrupted ERROR 70100: Query execution was interrupted
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t2, t3; DROP TABLE t2, t3;
# #
# MDEV-267: SHOW EXPLAIN: Server crashes in JOIN::print_explain on most of queries # MDEV-267: SHOW EXPLAIN: Server crashes in JOIN::print_explain on most of queries
# #
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
select sleep(1); select sleep(1);
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -479,12 +479,12 @@ Note 1003 select sleep(1) ...@@ -479,12 +479,12 @@ Note 1003 select sleep(1)
connection con1; connection con1;
sleep(1) sleep(1)
0 0
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# #
# Same as above, but try another reason for JOIN to be degenerate # Same as above, but try another reason for JOIN to be degenerate
# #
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
select * from t0 where 1>10; select * from t0 where 1>10;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -494,14 +494,14 @@ Warnings: ...@@ -494,14 +494,14 @@ Warnings:
Note 1003 select * from t0 where 1>10 Note 1003 select * from t0 where 1>10
connection con1; connection con1;
a a
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# #
# Same as above, but try another reason for JOIN to be degenerate (2) # Same as above, but try another reason for JOIN to be degenerate (2)
# #
create table t3(a int primary key); create table t3(a int primary key);
insert into t3 select a from t0; insert into t3 select a from t0;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
select * from t0,t3 where t3.a=112233; select * from t0,t3 where t3.a=112233;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -511,7 +511,7 @@ Warnings: ...@@ -511,7 +511,7 @@ Warnings:
Note 1003 select * from t0,t3 where t3.a=112233 Note 1003 select * from t0,t3 where t3.a=112233
connection con1; connection con1;
a a a a
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t3; drop table t3;
# #
# MDEV-270: SHOW EXPLAIN: server crashes in JOIN::print_explain on a query with # MDEV-270: SHOW EXPLAIN: server crashes in JOIN::print_explain on a query with
...@@ -530,7 +530,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -530,7 +530,7 @@ id select_type table type possible_keys key key_len ref rows Extra
2 SUBQUERY t2 const PRIMARY PRIMARY 4 const 1 2 SUBQUERY t2 const PRIMARY PRIMARY 4 const 1
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away 3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; SET debug_dbug='+d,show_explain_probe_do_select';
SELECT * FROM t2 WHERE a = SELECT * FROM t2 WHERE a =
(SELECT MAX(a) FROM t2 (SELECT MAX(a) FROM t2
WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3) WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3)
...@@ -552,7 +552,7 @@ pk a ...@@ -552,7 +552,7 @@ pk a
6 7 6 7
7 7 7 7
9 7 9 7
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t2; drop table t2;
# #
# MDEV-273: SHOW EXPLAIN: server crashes in JOIN::print_explain on a query with impossible WHERE # MDEV-273: SHOW EXPLAIN: server crashes in JOIN::print_explain on a query with impossible WHERE
...@@ -584,7 +584,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -584,7 +584,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 87 Using join buffer (flat, BNL join) 1 PRIMARY t3 ALL NULL NULL NULL NULL 87 Using join buffer (flat, BNL join)
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; SET debug_dbug='+d,show_explain_probe_do_select';
SELECT count(*) FROM t2, t3 SELECT count(*) FROM t2, t3
WHERE a1 < ALL ( WHERE a1 < ALL (
SELECT a1 FROM t2 SELECT a1 FROM t2
...@@ -605,7 +605,7 @@ WHERE a1 IN ( SELECT a1 FROM t2, t4 ) ...@@ -605,7 +605,7 @@ WHERE a1 IN ( SELECT a1 FROM t2, t4 )
connection con1; connection con1;
count(*) count(*)
1740 1740
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t2, t3, t4; drop table t2, t3, t4;
# #
# MDEV-275: SHOW EXPLAIN: server crashes in JOIN::print_explain with IN subquery and aggregate function # MDEV-275: SHOW EXPLAIN: server crashes in JOIN::print_explain with IN subquery and aggregate function
...@@ -615,7 +615,7 @@ INSERT INTO t2 VALUES ...@@ -615,7 +615,7 @@ INSERT INTO t2 VALUES
(1,5),(2,4),(3,6),(4,9),(5,2),(6,8),(7,4),(8,8),(9,0),(10,43), (1,5),(2,4),(3,6),(4,9),(5,2),(6,8),(7,4),(8,8),(9,0),(10,43),
(11,23),(12,3),(13,45),(14,16),(15,2),(16,33),(17,2),(18,5),(19,9),(20,2); (11,23),(12,3),(13,45),(14,16),(15,2),(16,33),(17,2),(18,5),(19,9),(20,2);
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`); SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`);
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -627,7 +627,7 @@ Warnings: ...@@ -627,7 +627,7 @@ Warnings:
Note 1003 SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`) Note 1003 SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`)
connection con1; connection con1;
pk a1 pk a1
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t1; DROP TABLE t1;
# #
...@@ -636,7 +636,7 @@ DROP TABLE t1; ...@@ -636,7 +636,7 @@ DROP TABLE t1;
CREATE TABLE t1(a INT, KEY(a)); CREATE TABLE t1(a INT, KEY(a));
INSERT INTO t1 VALUES (3),(1),(5),(1); INSERT INTO t1 VALUES (3),(1),(5),(1);
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
SELECT 'test' FROM t1 WHERE a=1; SELECT 'test' FROM t1 WHERE a=1;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -648,7 +648,7 @@ connection con1; ...@@ -648,7 +648,7 @@ connection con1;
test test
test test
test test
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-299: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN changes back and forth during query execution # MDEV-299: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN changes back and forth during query execution
...@@ -666,7 +666,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -666,7 +666,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A ALL NULL NULL NULL NULL 100 Using where 1 SIMPLE A ALL NULL NULL NULL NULL 100 Using where
1 SIMPLE B ALL key1 NULL NULL NULL 100 Range checked for each record (index map: 0x1) 1 SIMPLE B ALL key1 NULL NULL NULL 100 Range checked for each record (index map: 0x1)
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_test_if_quick_select'; SET debug_dbug='+d,show_explain_probe_test_if_quick_select';
select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100; select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -696,7 +696,7 @@ Note 1003 select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND ...@@ -696,7 +696,7 @@ Note 1003 select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND
connection con1; connection con1;
count(*) count(*)
212 212
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t1; drop table t1;
# #
# MDEV-297: SHOW EXPLAIN: Server gets stuck until timeout occurs while # MDEV-297: SHOW EXPLAIN: Server gets stuck until timeout occurs while
...@@ -705,7 +705,7 @@ drop table t1; ...@@ -705,7 +705,7 @@ drop table t1;
CREATE TABLE t1(a INT, b INT, c INT, KEY(a), KEY(b), KEY(c)); CREATE TABLE t1(a INT, b INT, c INT, KEY(a), KEY(b), KEY(c));
INSERT INTO t1 (a) VALUES (3),(1),(5),(1); INSERT INTO t1 (a) VALUES (3),(1),(5),(1);
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
SHOW INDEX FROM t1; SHOW INDEX FROM t1;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -718,7 +718,7 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par ...@@ -718,7 +718,7 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
t1 1 a 1 a A NULL NULL NULL YES BTREE t1 1 a 1 a A NULL NULL NULL YES BTREE
t1 1 b 1 b A NULL NULL NULL YES BTREE t1 1 b 1 b A NULL NULL NULL YES BTREE
t1 1 c 1 c A NULL NULL NULL YES BTREE t1 1 c 1 c A NULL NULL NULL YES BTREE
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-324: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN for a query with TEMPTABLE view # MDEV-324: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN for a query with TEMPTABLE view
...@@ -731,7 +731,7 @@ EXPLAIN SELECT a + 1 FROM v1; ...@@ -731,7 +731,7 @@ EXPLAIN SELECT a + 1 FROM v1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED t1 ALL NULL NULL NULL NULL 2 2 DERIVED t1 ALL NULL NULL NULL NULL 2
set debug_dbug='+d,show_explain_probe_join_tab_preread'; SET debug_dbug='+d,show_explain_probe_join_tab_preread';
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
SELECT a + 1 FROM v1; SELECT a + 1 FROM v1;
connection default; connection default;
...@@ -745,7 +745,7 @@ connection con1; ...@@ -745,7 +745,7 @@ connection con1;
a + 1 a + 1
2 2
3 3
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
# #
...@@ -761,7 +761,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -761,7 +761,7 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used 2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used 3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
set debug_dbug='+d,show_explain_probe_union_read'; SET debug_dbug='+d,show_explain_probe_union_read';
SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ); SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 );
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -782,7 +782,7 @@ Warnings: ...@@ -782,7 +782,7 @@ Warnings:
Note 1003 SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ) Note 1003 SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 )
connection con1; connection con1;
a a
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-327: SHOW EXPLAIN: Different select_type in plans produced by SHOW EXPLAIN # MDEV-327: SHOW EXPLAIN: Different select_type in plans produced by SHOW EXPLAIN
...@@ -805,7 +805,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -805,7 +805,7 @@ id select_type table type possible_keys key key_len ref rows Extra
3 SUBQUERY t1 ALL NULL NULL NULL NULL 20 3 SUBQUERY t1 ALL NULL NULL NULL NULL 20
3 SUBQUERY t2 ALL NULL NULL NULL NULL 20 Using where 3 SUBQUERY t2 ALL NULL NULL NULL NULL 20 Using where
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias
WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ); WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b );
connection default; connection default;
...@@ -820,7 +820,7 @@ Note 1003 SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias ...@@ -820,7 +820,7 @@ Note 1003 SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias
WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ) WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b )
connection con1; connection con1;
a b a b
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1, t2; DROP TABLE t1, t2;
# #
# Test that SHOW EXPLAIN will print 'Distinct'. # Test that SHOW EXPLAIN will print 'Distinct'.
...@@ -842,7 +842,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -842,7 +842,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary 1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary
1 SIMPLE t3 ref a a 5 test.t1.a 7 Using index; Distinct 1 SIMPLE t3 ref a a 5 test.t1.a 7 Using index; Distinct
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select distinct t1.a from t1,t3 where t1.a=t3.a; select distinct t1.a from t1,t3 where t1.a=t3.a;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -855,7 +855,7 @@ connection con1; ...@@ -855,7 +855,7 @@ connection con1;
a a
1 1
2 2
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t1,t3,t4; drop table t1,t3,t4;
# #
# ---------- SHOW EXPLAIN and permissions ----------------- # ---------- SHOW EXPLAIN and permissions -----------------
...@@ -869,7 +869,7 @@ connection con1; ...@@ -869,7 +869,7 @@ connection con1;
# First, make sure that user 'test2' cannot do SHOW EXPLAIN on us # First, make sure that user 'test2' cannot do SHOW EXPLAIN on us
# #
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select * from t0 where a < 3; select * from t0 where a < 3;
connection default; connection default;
connection con2; connection con2;
...@@ -886,14 +886,14 @@ a ...@@ -886,14 +886,14 @@ a
0 0
1 1
2 2
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# #
# Check that user test2 can do SHOW EXPLAIN on its own queries # Check that user test2 can do SHOW EXPLAIN on its own queries
# #
connect con3, localhost, test2,,; connect con3, localhost, test2,,;
connection con2; connection con2;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select * from t0 where a < 3; select * from t0 where a < 3;
connection con1; connection con1;
connection con3; connection con3;
...@@ -916,9 +916,9 @@ disconnect con2; ...@@ -916,9 +916,9 @@ disconnect con2;
grant process on *.* to test2@localhost; grant process on *.* to test2@localhost;
connect con2, localhost, test2,,; connect con2, localhost, test2,,;
connection con1; connection con1;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select * from t0 where a < 3; select * from t0 where a < 3;
connection default; connection default;
connection con2; connection con2;
...@@ -932,7 +932,7 @@ a ...@@ -932,7 +932,7 @@ a
0 0
1 1
2 2
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
revoke all privileges on test.* from test2@localhost; revoke all privileges on test.* from test2@localhost;
drop user test2@localhost; drop user test2@localhost;
disconnect con2; disconnect con2;
...@@ -1009,7 +1009,7 @@ ORDER BY b; ...@@ -1009,7 +1009,7 @@ ORDER BY b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using filesort 1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using filesort
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
SELECT a+SLEEP(0.01) FROM t1 SELECT a+SLEEP(0.01) FROM t1
WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129
ORDER BY b; ORDER BY b;
...@@ -1030,9 +1030,9 @@ a+SLEEP(0.01) ...@@ -1030,9 +1030,9 @@ a+SLEEP(0.01)
0 0
0 0
0 0
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; SET debug_dbug='+d,show_explain_probe_do_select';
SELECT a+SLEEP(0.01) FROM t1 SELECT a+SLEEP(0.01) FROM t1
WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129
ORDER BY b; ORDER BY b;
...@@ -1053,7 +1053,7 @@ a+SLEEP(0.01) ...@@ -1053,7 +1053,7 @@ a+SLEEP(0.01)
0 0
0 0
0 0
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t1; drop table t1;
# #
# MDEV-298: SHOW EXPLAIN: Plan returned by SHOW EXPLAIN only contains # MDEV-298: SHOW EXPLAIN: Plan returned by SHOW EXPLAIN only contains
...@@ -1067,7 +1067,7 @@ EXPLAIN SELECT a FROM t1 GROUP BY a; ...@@ -1067,7 +1067,7 @@ EXPLAIN SELECT a FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4112 Using temporary; Using filesort 1 SIMPLE t1 ALL NULL NULL NULL NULL 4112 Using temporary; Using filesort
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
SELECT a FROM t1 GROUP BY a; SELECT a FROM t1 GROUP BY a;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -1093,7 +1093,7 @@ a ...@@ -1093,7 +1093,7 @@ a
14 14
15 15
16 16
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t1; drop table t1;
# #
# MDEV-408: SHOW EXPLAIN: Some values are chopped off in SHOW EXPLAIN output # MDEV-408: SHOW EXPLAIN: Some values are chopped off in SHOW EXPLAIN output
...@@ -1107,7 +1107,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -1107,7 +1107,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY t2 index_subquery PRIMARY,c c 5 func 1 Using index; Using where 2 DEPENDENT SUBQUERY t2 index_subquery PRIMARY,c c 5 func 1 Using index; Using where
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's'; SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's';
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -1119,7 +1119,7 @@ Note 1003 SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE ...@@ -1119,7 +1119,7 @@ Note 1003 SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE
connection con1; connection con1;
SUM(a + SLEEP(0.1)) SUM(a + SLEEP(0.1))
7862 7862
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t1, t2; drop table t1, t2;
# #
# MDEV-412: SHOW EXPLAIN: Server crashes in JOIN::print_explain on a query with inner join and ORDER BY the same column twice # MDEV-412: SHOW EXPLAIN: Server crashes in JOIN::print_explain on a query with inner join and ORDER BY the same column twice
...@@ -1157,7 +1157,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -1157,7 +1157,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range b b 6 NULL 107 Using where; Using index 1 SIMPLE t1 range b b 6 NULL 107 Using where; Using index
1 SIMPLE t3 ref PRIMARY PRIMARY 5 test.t1.b 1 Using index 1 SIMPLE t3 ref PRIMARY PRIMARY 5 test.t1.b 1 Using index
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; SET debug_dbug='+d,show_explain_probe_do_select';
SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2; SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -1169,7 +1169,7 @@ Warnings: ...@@ -1169,7 +1169,7 @@ Warnings:
Note 1003 SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2 Note 1003 SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2
connection con1; connection con1;
field1 field2 field1 field2
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
# #
# MDEV-423: SHOW EXPLAIN: 'Using where' for a subquery is shown in EXPLAIN, but not in SHOW EXPLAIN output # MDEV-423: SHOW EXPLAIN: 'Using where' for a subquery is shown in EXPLAIN, but not in SHOW EXPLAIN output
...@@ -1190,7 +1190,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -1190,7 +1190,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 20 1 PRIMARY t2 ALL NULL NULL NULL NULL 20
3 SUBQUERY t3 ALL NULL NULL NULL NULL 20 Using where 3 SUBQUERY t3 ALL NULL NULL NULL NULL 20 Using where
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias
WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10; WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10;
connection default; connection default;
...@@ -1205,7 +1205,7 @@ WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10 ...@@ -1205,7 +1205,7 @@ WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10
connection con1; connection con1;
max(a+b+c) max(a+b+c)
279 279
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
# #
# MDEV-416: Server crashes in SQL_SELECT::cleanup on EXPLAIN with SUM ( DISTINCT ) in a non-correlated subquery (5.5-show-explain tree) # MDEV-416: Server crashes in SQL_SELECT::cleanup on EXPLAIN with SUM ( DISTINCT ) in a non-correlated subquery (5.5-show-explain tree)
...@@ -1231,7 +1231,7 @@ select hex(' ...@@ -1231,7 +1231,7 @@ select hex('
hex('') hex('')
E3FB E3FB
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
select * from t0 where length('') = a; select * from t0 where length('') = a;
connection default; connection default;
set names utf8; set names utf8;
...@@ -1244,7 +1244,7 @@ set names default; ...@@ -1244,7 +1244,7 @@ set names default;
connection con1; connection con1;
a a
2 2
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
set names default; set names default;
# #
# MDEV-462: SHOW EXPLAIN: Assertion `table_list->table' fails in find_field_in_table_ref if FOR contains a non-numeric value # MDEV-462: SHOW EXPLAIN: Assertion `table_list->table' fails in find_field_in_table_ref if FOR contains a non-numeric value
...@@ -1270,7 +1270,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -1270,7 +1270,7 @@ id select_type table type possible_keys key key_len ref rows Extra
3 DEPENDENT SUBQUERY t1 ALL a NULL NULL NULL 2 Range checked for each record (index map: 0x1) 3 DEPENDENT SUBQUERY t1 ALL a NULL NULL NULL 2 Range checked for each record (index map: 0x1)
4 SUBQUERY t2 ALL NULL NULL NULL NULL 2 4 SUBQUERY t2 ALL NULL NULL NULL NULL 2
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
SELECT SUM(b) FROM ( SELECT * FROM t1 ) AS alias1, t2 SELECT SUM(b) FROM ( SELECT * FROM t1 ) AS alias1, t2
WHERE b <= ANY ( WHERE b <= ANY (
SELECT a FROM t1 SELECT a FROM t1
...@@ -1290,7 +1290,7 @@ WHERE a = b + SLEEP(0.2) OR a >= ( SELECT SUM(b) FROM t2 )) ...@@ -1290,7 +1290,7 @@ WHERE a = b + SLEEP(0.2) OR a >= ( SELECT SUM(b) FROM t2 ))
connection con1; connection con1;
SUM(b) SUM(b)
0 0
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1,t2; DROP TABLE t1,t2;
drop table t0; drop table t0;
# #
...@@ -1302,7 +1302,7 @@ create table t1 (a int, b int); ...@@ -1302,7 +1302,7 @@ create table t1 (a int, b int);
insert into t1 select a,a from t0; insert into t1 select a,a from t0;
create table t2 as select * from t1; create table t2 as select * from t1;
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_best_ext_lim_search'; SET debug_dbug='+d,show_explain_probe_best_ext_lim_search';
explain explain
select * from t0 select * from t0
where not exists ( select 1 from t1, t2 where t1.b=t2.b and t2.a=t0.a) and a is null; where not exists ( select 1 from t1, t2 where t1.b=t2.b and t2.a=t0.a) and a is null;
......
...@@ -14,7 +14,7 @@ from t0 A, t0 B, t0 C; ...@@ -14,7 +14,7 @@ from t0 A, t0 B, t0 C;
# Test SHOW EXPLAIN for single-table DELETE # Test SHOW EXPLAIN for single-table DELETE
# #
connection con2; connection con2;
set debug_dbug='+d,show_explain_probe_delete_exec_start'; SET debug_dbug='+d,show_explain_probe_delete_exec_start';
delete from t1 where a<10 and b+1>1000; delete from t1 where a<10 and b+1>1000;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -27,7 +27,7 @@ connection con2; ...@@ -27,7 +27,7 @@ connection con2;
# Test SHOW EXPLAIN for multi-table DELETE # Test SHOW EXPLAIN for multi-table DELETE
# #
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; SET debug_dbug='+d,show_explain_probe_do_select';
delete t1 from t1, t0 where t0.a=t1.a and t1.b +1 > 1000; delete t1 from t1, t0 where t0.a=t1.a and t1.b +1 > 1000;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -41,7 +41,7 @@ connection con2; ...@@ -41,7 +41,7 @@ connection con2;
# Test SHOW EXPLAIN for single-table UPDATE # Test SHOW EXPLAIN for single-table UPDATE
# #
connection con2; connection con2;
set debug_dbug='+d,show_explain_probe_update_exec_start'; SET debug_dbug='+d,show_explain_probe_update_exec_start';
update t1 set filler='filler-data-2' where a<10 and b+1>1000; update t1 set filler='filler-data-2' where a<10 and b+1>1000;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -51,5 +51,5 @@ Warnings: ...@@ -51,5 +51,5 @@ Warnings:
Note 1003 update t1 set filler='filler-data-2' where a<10 and b+1>1000 Note 1003 update t1 set filler='filler-data-2' where a<10 and b+1>1000
connection con2; connection con2;
drop table t0,t1; drop table t0,t1;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
set debug_sync='RESET'; set debug_sync='RESET';
...@@ -17,8 +17,8 @@ connection con1; ...@@ -17,8 +17,8 @@ connection con1;
connection default; connection default;
connection con1; connection con1;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set debug_dbug='d,show_explain_probe_join_exec_start'; SET debug_dbug='d,show_explain_probe_join_exec_start';
select count(*) from t0 where a < 100000; select count(*) from t0 where a < 100000;
connection default; connection default;
show explain for $thr2; show explain for $thr2;
...@@ -29,7 +29,7 @@ Note 1003 select count(*) from t0 where a < 100000 ...@@ -29,7 +29,7 @@ Note 1003 select count(*) from t0 where a < 100000
connection con1; connection con1;
count(*) count(*)
10 10
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
select event_name select event_name
from from
performance_schema.events_stages_history_long join performance_schema.events_stages_history_long join
......
...@@ -3,8 +3,8 @@ create table t1 (a int, b int) engine=memory; ...@@ -3,8 +3,8 @@ create table t1 (a int, b int) engine=memory;
insert t1 select seq, seq+1 from seq_1_to_1000; insert t1 select seq, seq+1 from seq_1_to_1000;
set global general_log=0; set global general_log=0;
set global log_queries_not_using_indexes=1; set global log_queries_not_using_indexes=1;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set debug_dbug='+d,simulate_file_write_error'; SET debug_dbug='+d,simulate_file_write_error';
select * from t1 where a>10; select * from t1 where a>10;
select * from t1 where a>10; select * from t1 where a>10;
select * from t1 where a>10; select * from t1 where a>10;
...@@ -55,7 +55,7 @@ select * from t1 where a>10; ...@@ -55,7 +55,7 @@ select * from t1 where a>10;
select * from t1 where a>10; select * from t1 where a>10;
select * from t1 where a>10; select * from t1 where a>10;
select * from t1 where a>10; select * from t1 where a>10;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
set global general_log=1; set global general_log=1;
set global log_queries_not_using_indexes=default; set global log_queries_not_using_indexes=default;
drop table t1; drop table t1;
call mtr.add_suppression("No space left on device"); call mtr.add_suppression("No space left on device");
create table t1 (a varchar(255), b varchar(255), c varchar(255)); create table t1 (a varchar(255), b varchar(255), c varchar(255));
set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3; set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set debug_dbug='+d,simulate_file_write_error'; SET debug_dbug='+d,simulate_file_write_error';
set @@max_heap_table_size=128*1024; set @@max_heap_table_size=128*1024;
analyze table t1; analyze table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze Error Error writing file 'tmp-file' (Errcode: 28 "No space left on device") test.t1 analyze Error Error writing file 'tmp-file' (Errcode: 28 "No space left on device")
test.t1 analyze status Operation failed test.t1 analyze status Operation failed
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
drop table t1; drop table t1;
create table t1 (i tinyint); create table t1 (i tinyint);
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set debug_dbug='+d,bug11747970_raise_error'; SET debug_dbug='+d,bug11747970_raise_error';
insert into t1 (i) select i from t1 union select i from t1; insert into t1 (i) select i from t1 union select i from t1;
ERROR 70100: Query execution was interrupted ERROR 70100: Query execution was interrupted
drop table t1; drop table t1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
drop table if exists t1; drop table if exists t1;
create table t1 (a int primary key) engine=innodb; create table t1 (a int primary key) engine=innodb;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,warn_during_ha_commit_trans"; SET SESSION debug_dbug="+d,warn_during_ha_commit_trans";
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
Warnings: Warnings:
...@@ -9,4 +9,4 @@ SHOW WARNINGS; ...@@ -9,4 +9,4 @@ SHOW WARNINGS;
Level Code Message Level Code Message
Warning 1196 Some non-transactional changed tables couldn't be rolled back Warning 1196 Some non-transactional changed tables couldn't be rolled back
drop table t1; drop table t1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -2,7 +2,7 @@ CALL mtr.add_suppression("Error writing file 'master-bin'"); ...@@ -2,7 +2,7 @@ CALL mtr.add_suppression("Error writing file 'master-bin'");
RESET MASTER; RESET MASTER;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb;
INSERT INTO t1 VALUES(0); INSERT INTO t1 VALUES(0);
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug='+d,fail_binlog_write_1'; SET SESSION debug_dbug='+d,fail_binlog_write_1';
INSERT INTO t1 VALUES(1); INSERT INTO t1 VALUES(1);
ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device")
......
...@@ -2,7 +2,7 @@ CALL mtr.add_suppression("Error writing file 'master-bin'"); ...@@ -2,7 +2,7 @@ CALL mtr.add_suppression("Error writing file 'master-bin'");
RESET MASTER; RESET MASTER;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb;
INSERT INTO t1 VALUES(0); INSERT INTO t1 VALUES(0);
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug='+d,fail_binlog_write_1'; SET SESSION debug_dbug='+d,fail_binlog_write_1';
INSERT INTO t1 VALUES(1); INSERT INTO t1 VALUES(1);
ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device")
......
...@@ -93,7 +93,7 @@ set @save_dbug = @@session.debug_dbug; ...@@ -93,7 +93,7 @@ set @save_dbug = @@session.debug_dbug;
set @@session.debug_dbug='d,simulate_checksum_test_failure'; set @@session.debug_dbug='d,simulate_checksum_test_failure';
show binlog events; show binlog events;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
set debug_dbug= @save_dbug; SET debug_dbug= @save_dbug;
set @@global.master_verify_checksum = default; set @@global.master_verify_checksum = default;
connection slave; connection slave;
connection slave; connection slave;
......
...@@ -265,7 +265,7 @@ DROP TABLE t1, t2; ...@@ -265,7 +265,7 @@ DROP TABLE t1, t2;
--echo # --echo #
--let $datadir= `select @@datadir` --let $datadir= `select @@datadir`
set @saved_dbug= @@global.debug_dbug; SET @saved_dbug= @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2"; set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
create table t1 ( create table t1 (
...@@ -349,7 +349,7 @@ SET GLOBAL innodb_debug_sync = "ib_open_after_dict_open " ...@@ -349,7 +349,7 @@ SET GLOBAL innodb_debug_sync = "ib_open_after_dict_open "
# In 10.2 trx_undo_roll_ptr_is_insert(t_roll_ptr) condition never pass in purge, # In 10.2 trx_undo_roll_ptr_is_insert(t_roll_ptr) condition never pass in purge,
# so this condition is forced to pass in row_vers_old_has_index_entry # so this condition is forced to pass in row_vers_old_has_index_entry
set @saved_dbug= @@global.debug_dbug; SET @saved_dbug= @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,ib_purge_virtual_index_callback"; set global debug_dbug= "+d,ib_purge_virtual_index_callback";
# The purge starts from REPLACE command. To avoid possible race, separate # The purge starts from REPLACE command. To avoid possible race, separate
......
...@@ -8,10 +8,10 @@ select f1, substring(f2, 1, 40) from t1; ...@@ -8,10 +8,10 @@ select f1, substring(f2, 1, 40) from t1;
f1 substring(f2, 1, 40) f1 substring(f2, 1, 40)
1 **************************************** 1 ****************************************
set @saved_debug = @@session.debug_dbug; set @saved_debug = @@session.debug_dbug;
set debug_dbug = 'd,row_ins_index_entry_timeout'; SET debug_dbug = 'd,row_ins_index_entry_timeout';
update t1 set f1 = 3; update t1 set f1 = 3;
select f1, substring(f2, 1, 40) from t1; select f1, substring(f2, 1, 40) from t1;
f1 substring(f2, 1, 40) f1 substring(f2, 1, 40)
3 **************************************** 3 ****************************************
drop table t1; drop table t1;
set debug_dbug= @saved_debug; SET debug_dbug= @saved_debug;
...@@ -5,10 +5,10 @@ create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2), ...@@ -5,10 +5,10 @@ create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2),
key k2(f3)) engine=innodb; key k2(f3)) engine=innodb;
insert into t1 values (14, 24, 34); insert into t1 values (14, 24, 34);
set @old_dbug= @@session.debug_dbug; set @old_dbug= @@session.debug_dbug;
set debug_dbug = '+d,row_ins_sec_index_entry_timeout'; SET debug_dbug = '+d,row_ins_sec_index_entry_timeout';
replace into t1 values (14, 25, 34); replace into t1 values (14, 25, 34);
select * from t1; select * from t1;
f1 f2 f3 f1 f2 f3
14 25 34 14 25 34
drop table t1; drop table t1;
set debug_dbug = @old_dbug; SET debug_dbug = @old_dbug;
call mtr.add_suppression("InnoDB: Warning: Index.*"); call mtr.add_suppression("InnoDB: Warning: Index.*");
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set DEBUG_DBUG='+d,ib_ha_innodb_stat_not_initialized'; set DEBUG_DBUG='+d,ib_ha_innodb_stat_not_initialized';
create table t1(a int not null primary key, b int, c int, key(b), key(c)) engine=innodb; create table t1(a int not null primary key, b int, c int, key(b), key(c)) engine=innodb;
create procedure innodb_insert_proc (repeat_count int) create procedure innodb_insert_proc (repeat_count int)
...@@ -30,4 +30,4 @@ count(1) ...@@ -30,4 +30,4 @@ count(1)
781 781
drop procedure innodb_insert_proc; drop procedure innodb_insert_proc;
drop table t1; drop table t1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
DROP TABLE bug11754376; DROP TABLE bug11754376;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
SET GLOBAL innodb_file_per_table=0; SET GLOBAL innodb_file_per_table=0;
create table bug56947(a int not null) engine = innodb; create table bug56947(a int not null) engine = innodb;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename'; SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
alter table bug56947 add unique index (a); alter table bug56947 add unique index (a);
ERROR HY000: Got error 11 "xxx" from storage engine InnoDB ERROR HY000: Got error 11 "xxx" from storage engine InnoDB
...@@ -9,4 +9,4 @@ Table Op Msg_type Msg_text ...@@ -9,4 +9,4 @@ Table Op Msg_type Msg_text
test.bug56947 check status OK test.bug56947 check status OK
drop table bug56947; drop table bug56947;
SET @@global.innodb_file_per_table=DEFAULT; SET @@global.innodb_file_per_table=DEFAULT;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -24,7 +24,7 @@ test.corrupt_bit_test_ā check Warning InnoDB: Index idx is marked as corrupted ...@@ -24,7 +24,7 @@ test.corrupt_bit_test_ā check Warning InnoDB: Index idx is marked as corrupted
test.corrupt_bit_test_ā check Warning InnoDB: Index idxā is marked as corrupted test.corrupt_bit_test_ā check Warning InnoDB: Index idxā is marked as corrupted
test.corrupt_bit_test_ā check Warning InnoDB: Index idxē is marked as corrupted test.corrupt_bit_test_ā check Warning InnoDB: Index idxē is marked as corrupted
test.corrupt_bit_test_ā check error Corrupt test.corrupt_bit_test_ā check error Corrupt
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c); CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c);
ERROR HY000: Index idx is corrupted ERROR HY000: Index idx is corrupted
CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z); CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z);
......
...@@ -4,7 +4,7 @@ drop table if exists t1; ...@@ -4,7 +4,7 @@ drop table if exists t1;
connection con1; connection con1;
create table t1 (id integer, x integer) engine = InnoDB; create table t1 (id integer, x integer) engine = InnoDB;
insert into t1 values(0, 0); insert into t1 values(0, 0);
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set DEBUG_DBUG='+d,fatal-semaphore-timeout'; set DEBUG_DBUG='+d,fatal-semaphore-timeout';
set autocommit=0; set autocommit=0;
# Sending query on con1, # Sending query on con1,
...@@ -22,6 +22,6 @@ connection default; ...@@ -22,6 +22,6 @@ connection default;
# Waitting for reconnect after mysqld restarts # Waitting for reconnect after mysqld restarts
# Reconnected after mysqld was successfully restarted # Reconnected after mysqld was successfully restarted
# Cleaning up before exit # Cleaning up before exit
set debug_dbug = @saved_dbug; SET debug_dbug = @saved_dbug;
drop table if exists t1; drop table if exists t1;
# Clean exit # Clean exit
...@@ -7,10 +7,10 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); ...@@ -7,10 +7,10 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check status OK test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_assigning_undo_log'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_assigning_undo_log';
truncate table t; truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check status OK test.t check status OK
...@@ -20,10 +20,10 @@ i f c ...@@ -20,10 +20,10 @@ i f c
2 2.2 b 2 2.2 b
3 3.3 c 3 3.3 c
# 2. Error while preparing for truncate # 2. Error while preparing for truncate
SET debug_dbug = '+d,ib_err_trunc_preparing_for_truncate'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_preparing_for_truncate';
truncate table t; truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check status OK test.t check status OK
...@@ -33,10 +33,10 @@ i f c ...@@ -33,10 +33,10 @@ i f c
2 2.2 b 2 2.2 b
3 3.3 c 3 3.3 c
# 3. Error while dropping/creating indexes # 3. Error while dropping/creating indexes
SET debug_dbug = '+d,ib_err_trunc_drop_index'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_drop_index';
truncate table t; truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check Warning InnoDB: Index PRIMARY is marked as corrupted test.t check Warning InnoDB: Index PRIMARY is marked as corrupted
...@@ -50,10 +50,10 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); ...@@ -50,10 +50,10 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check status OK test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_create_index'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_create_index';
truncate table t; truncate table t;
ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check Warning InnoDB: Index PRIMARY is marked as corrupted test.t check Warning InnoDB: Index PRIMARY is marked as corrupted
...@@ -67,9 +67,9 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); ...@@ -67,9 +67,9 @@ insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check status OK test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t; truncate table t;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check status OK test.t check status OK
...@@ -85,9 +85,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'), ...@@ -85,9 +85,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'),
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check status OK test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t; truncate table t;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check status OK test.t check status OK
...@@ -103,9 +103,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'), ...@@ -103,9 +103,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'),
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check status OK test.t check status OK
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t; truncate table t;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t check status OK test.t check status OK
......
...@@ -12,8 +12,8 @@ create table t1 (f1 int primary key, f2 blob) engine = innodb; ...@@ -12,8 +12,8 @@ create table t1 (f1 int primary key, f2 blob) engine = innodb;
insert into t1 values (1, repeat('*', 50000)); insert into t1 values (1, repeat('*', 50000));
select f1, substring(f2, 1, 40) from t1; select f1, substring(f2, 1, 40) from t1;
set @saved_debug = @@session.debug_dbug; set @saved_debug = @@session.debug_dbug;
set debug_dbug = 'd,row_ins_index_entry_timeout'; SET debug_dbug = 'd,row_ins_index_entry_timeout';
update t1 set f1 = 3; update t1 set f1 = 3;
select f1, substring(f2, 1, 40) from t1; select f1, substring(f2, 1, 40) from t1;
drop table t1; drop table t1;
set debug_dbug= @saved_debug; SET debug_dbug= @saved_debug;
...@@ -9,8 +9,8 @@ create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2), ...@@ -9,8 +9,8 @@ create table t1 (f1 int primary key, f2 int, f3 int, unique key k1(f2),
key k2(f3)) engine=innodb; key k2(f3)) engine=innodb;
insert into t1 values (14, 24, 34); insert into t1 values (14, 24, 34);
set @old_dbug= @@session.debug_dbug; set @old_dbug= @@session.debug_dbug;
set debug_dbug = '+d,row_ins_sec_index_entry_timeout'; SET debug_dbug = '+d,row_ins_sec_index_entry_timeout';
replace into t1 values (14, 25, 34); replace into t1 values (14, 25, 34);
select * from t1; select * from t1;
drop table t1; drop table t1;
set debug_dbug = @old_dbug; SET debug_dbug = @old_dbug;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
call mtr.add_suppression("InnoDB: Warning: Index.*"); call mtr.add_suppression("InnoDB: Warning: Index.*");
# This caused crash earlier # This caused crash earlier
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set DEBUG_DBUG='+d,ib_ha_innodb_stat_not_initialized'; set DEBUG_DBUG='+d,ib_ha_innodb_stat_not_initialized';
create table t1(a int not null primary key, b int, c int, key(b), key(c)) engine=innodb; create table t1(a int not null primary key, b int, c int, key(b), key(c)) engine=innodb;
...@@ -37,4 +37,4 @@ select count(1) from t1 where c between 7 and 787; ...@@ -37,4 +37,4 @@ select count(1) from t1 where c between 7 and 787;
drop procedure innodb_insert_proc; drop procedure innodb_insert_proc;
drop table t1; drop table t1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
# This will invoke test_normalize_table_name_low() in debug builds # This will invoke test_normalize_table_name_low() in debug builds
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
DROP TABLE bug11754376; DROP TABLE bug11754376;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
SET GLOBAL innodb_file_per_table=0; SET GLOBAL innodb_file_per_table=0;
create table bug56947(a int not null) engine = innodb; create table bug56947(a int not null) engine = innodb;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename'; SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
--replace_regex /"[^"]*"/"xxx"/ --replace_regex /"[^"]*"/"xxx"/
--error ER_GET_ERRNO --error ER_GET_ERRNO
...@@ -16,4 +16,4 @@ check table bug56947; ...@@ -16,4 +16,4 @@ check table bug56947;
drop table bug56947; drop table bug56947;
SET @@global.innodb_file_per_table=DEFAULT; SET @@global.innodb_file_per_table=DEFAULT;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -36,7 +36,7 @@ select count(*) from corrupt_bit_test_ā; ...@@ -36,7 +36,7 @@ select count(*) from corrupt_bit_test_ā;
SET @save_dbug = @@SESSION.debug_dbug; SET @save_dbug = @@SESSION.debug_dbug;
SET debug_dbug = '+d,dict_set_index_corrupted'; SET debug_dbug = '+d,dict_set_index_corrupted';
check table corrupt_bit_test_ā; check table corrupt_bit_test_ā;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
# Cannot create new indexes while corrupted indexes exist # Cannot create new indexes while corrupted indexes exist
--error ER_INDEX_CORRUPT --error ER_INDEX_CORRUPT
......
...@@ -17,7 +17,7 @@ eval create table t1 (id integer, x integer) engine = InnoDB; ...@@ -17,7 +17,7 @@ eval create table t1 (id integer, x integer) engine = InnoDB;
insert into t1 values(0, 0); insert into t1 values(0, 0);
# Enable the debug injection. # Enable the debug injection.
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set DEBUG_DBUG='+d,fatal-semaphore-timeout'; set DEBUG_DBUG='+d,fatal-semaphore-timeout';
set autocommit=0; set autocommit=0;
...@@ -108,7 +108,7 @@ source include/wait_until_connected_again.inc; ...@@ -108,7 +108,7 @@ source include/wait_until_connected_again.inc;
--echo # Cleaning up before exit --echo # Cleaning up before exit
--disable_warnings --disable_warnings
set debug_dbug = @saved_dbug; SET debug_dbug = @saved_dbug;
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
......
...@@ -33,8 +33,8 @@ while ($i) ...@@ -33,8 +33,8 @@ while ($i)
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name --exec echo "wait" > $_expect_file_name
set debug_dbug = '+d,increase_mtr_checkpoint_size'; SET debug_dbug = '+d,increase_mtr_checkpoint_size';
set debug_dbug = '+d,crash_after_checkpoint'; SET debug_dbug = '+d,crash_after_checkpoint';
--error 2013 --error 2013
set global innodb_log_checkpoint_now = 1; set global innodb_log_checkpoint_now = 1;
...@@ -64,7 +64,7 @@ while ($i) ...@@ -64,7 +64,7 @@ while ($i)
--enable_query_log --enable_query_log
--exec echo "wait" > $_expect_file_name --exec echo "wait" > $_expect_file_name
set debug_dbug = '+d,crash_after_checkpoint'; SET debug_dbug = '+d,crash_after_checkpoint';
--error 2013 --error 2013
set global innodb_log_checkpoint_now = 1; set global innodb_log_checkpoint_now = 1;
......
...@@ -14,26 +14,26 @@ ENGINE = InnoDB; ...@@ -14,26 +14,26 @@ ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t; check table t;
# #
SET debug_dbug = '+d,ib_err_trunc_assigning_undo_log'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_assigning_undo_log';
--error ER_GET_ERRNO --error ER_GET_ERRNO
truncate table t; truncate table t;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
select * from t; select * from t;
--echo # 2. Error while preparing for truncate --echo # 2. Error while preparing for truncate
SET debug_dbug = '+d,ib_err_trunc_preparing_for_truncate'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_preparing_for_truncate';
--error ER_GET_ERRNO --error ER_GET_ERRNO
truncate table t; truncate table t;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
select * from t; select * from t;
--echo # 3. Error while dropping/creating indexes --echo # 3. Error while dropping/creating indexes
SET debug_dbug = '+d,ib_err_trunc_drop_index'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_drop_index';
--error ER_GET_ERRNO --error ER_GET_ERRNO
truncate table t; truncate table t;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
--error ER_TABLE_CORRUPT,ER_GET_ERRNO --error ER_TABLE_CORRUPT,ER_GET_ERRNO
select * from t; select * from t;
...@@ -44,10 +44,10 @@ ENGINE = InnoDB; ...@@ -44,10 +44,10 @@ ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t; check table t;
SET debug_dbug = '+d,ib_err_trunc_create_index'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_create_index';
--error ER_GET_ERRNO --error ER_GET_ERRNO
truncate table t; truncate table t;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
--error ER_TABLE_CORRUPT,ER_GET_ERRNO --error ER_TABLE_CORRUPT,ER_GET_ERRNO
select * from t; select * from t;
...@@ -58,9 +58,9 @@ ENGINE = InnoDB; ...@@ -58,9 +58,9 @@ ENGINE = InnoDB;
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
check table t; check table t;
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t; truncate table t;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
select * from t; select * from t;
...@@ -73,9 +73,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'), ...@@ -73,9 +73,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'), (2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql'); (3, 3.3, 'innodb is default storage engine of mysql');
check table t; check table t;
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t; truncate table t;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
select * from t; select * from t;
...@@ -88,9 +88,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'), ...@@ -88,9 +88,9 @@ insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'), (2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql'); (3, 3.3, 'innodb is default storage engine of mysql');
check table t; check table t;
SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; SET @@SESSION.debug_dbug = '+d,ib_err_trunc_temp_recreate_index';
truncate table t; truncate table t;
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
check table t; check table t;
select * from t order by i; select * from t order by i;
......
...@@ -17,7 +17,7 @@ INSERT INTO t1 VALUES('test'); ...@@ -17,7 +17,7 @@ INSERT INTO t1 VALUES('test');
CREATE TABLE t2 (f1 char(100), FULLTEXT idx1(f1))ENGINE=InnoDB; CREATE TABLE t2 (f1 char(100), FULLTEXT idx1(f1))ENGINE=InnoDB;
INSERT INTO t2 VALUES('mariadb'); INSERT INTO t2 VALUES('mariadb');
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug ='+d,fts_instrument_sync_request,ib_optimize_wq_hang'; SET GLOBAL debug_dbug ='+d,fts_instrument_sync_request,ib_optimize_wq_hang';
SET DEBUG_SYNC= 'fts_instrument_sync_request SET DEBUG_SYNC= 'fts_instrument_sync_request
SIGNAL drop_index_start WAIT_FOR sync_op'; SIGNAL drop_index_start WAIT_FOR sync_op';
...@@ -29,7 +29,7 @@ ALTER TABLE t2 drop index idx1; ...@@ -29,7 +29,7 @@ ALTER TABLE t2 drop index idx1;
connection default; connection default;
set DEBUG_SYNC= 'now SIGNAL fts_drop_index'; set DEBUG_SYNC= 'now SIGNAL fts_drop_index';
connection con1; connection con1;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
drop table t1, t2; drop table t1, t2;
connection default; connection default;
set DEBUG_SYNC=RESET; set DEBUG_SYNC=RESET;
...@@ -29,7 +29,7 @@ CREATE TABLE t2 (f1 char(100), FULLTEXT idx1(f1))ENGINE=InnoDB; ...@@ -29,7 +29,7 @@ CREATE TABLE t2 (f1 char(100), FULLTEXT idx1(f1))ENGINE=InnoDB;
INSERT INTO t2 VALUES('mariadb'); INSERT INTO t2 VALUES('mariadb');
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug ='+d,fts_instrument_sync_request,ib_optimize_wq_hang'; SET GLOBAL debug_dbug ='+d,fts_instrument_sync_request,ib_optimize_wq_hang';
SET DEBUG_SYNC= 'fts_instrument_sync_request SET DEBUG_SYNC= 'fts_instrument_sync_request
SIGNAL drop_index_start WAIT_FOR sync_op'; SIGNAL drop_index_start WAIT_FOR sync_op';
...@@ -46,7 +46,7 @@ set DEBUG_SYNC= 'now SIGNAL fts_drop_index'; ...@@ -46,7 +46,7 @@ set DEBUG_SYNC= 'now SIGNAL fts_drop_index';
connection con1; connection con1;
reap; reap;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
drop table t1, t2; drop table t1, t2;
connection default; connection default;
set DEBUG_SYNC=RESET; set DEBUG_SYNC=RESET;
...@@ -53,7 +53,7 @@ SET @save_dbug = @@SESSION.debug_dbug; ...@@ -53,7 +53,7 @@ SET @save_dbug = @@SESSION.debug_dbug;
SET debug_dbug='+d,row_merge_ins_spatial_fail'; SET debug_dbug='+d,row_merge_ins_spatial_fail';
--error ER_GET_ERRNO --error ER_GET_ERRNO
create spatial index idx2 on t1(c2); create spatial index idx2 on t1(c2);
SET debug_dbug = @save_dbug; SET @@SESSION.debug_dbug = @save_dbug;
show create table t1; show create table t1;
# Check table. # Check table.
......
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
create table `t1` (`c1` char(1) default null,`c2` char(10) default null, create table `t1` (`c1` char(1) default null,`c2` char(10) default null,
key (`c1`)) key (`c1`))
...@@ -8,4 +8,4 @@ select * from `t1` where `c1`='3' for update; ...@@ -8,4 +8,4 @@ select * from `t1` where `c1`='3' for update;
c1 c2 c1 c2
3 NULL 3 NULL
drop table `t1`; drop table `t1`;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
# #
# Bug#40992 - InnoDB: Crash when engine_condition_pushdown is on # Bug#40992 - InnoDB: Crash when engine_condition_pushdown is on
# #
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
CREATE TABLE t ( CREATE TABLE t (
dummy INT PRIMARY KEY, dummy INT PRIMARY KEY,
...@@ -14,4 +14,4 @@ dummy a b ...@@ -14,4 +14,4 @@ dummy a b
3 3 3 3 3 3
5 5 5 5 5 5
DROP TABLE t; DROP TABLE t;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
drop table if exists `t1`; drop table if exists `t1`;
Warnings: Warnings:
...@@ -7,4 +7,4 @@ create table `t1` (`c` bigint, key(`c`),`a` int)engine=innodb; ...@@ -7,4 +7,4 @@ create table `t1` (`c` bigint, key(`c`),`a` int)engine=innodb;
insert into `t1` values(2,2); insert into `t1` values(2,2);
delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ; delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ;
drop table `t1`; drop table `t1`;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
...@@ -253,4 +253,4 @@ Warning 1292 Truncated incorrect DOUBLE value: 'd' ...@@ -253,4 +253,4 @@ Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DOUBLE value: 'd'
drop table `table5`; drop table `table5`;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY
KEY(c1), UNIQUE INDEX(c2)) engine=innodb; KEY(c1), UNIQUE INDEX(c2)) engine=innodb;
...@@ -10,4 +10,4 @@ SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2; ...@@ -10,4 +10,4 @@ SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2;
c1 c2 c3 c1 c2 c3
08:29:45 NULL 2009-02-01 08:29:45 NULL 2009-02-01
drop table `t1`; drop table `t1`;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
# #
# Bug#43360 - Server crash with a simple multi-table update # Bug#43360 - Server crash with a simple multi-table update
# #
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
CREATE TABLE t1 ( CREATE TABLE t1 (
a CHAR(2) NOT NULL PRIMARY KEY, a CHAR(2) NOT NULL PRIMARY KEY,
...@@ -43,4 +43,4 @@ AB Sweden ...@@ -43,4 +43,4 @@ AB Sweden
MS United States of Ame MS United States of Ame
JA USA JA USA
DROP TABLE t1,t2; DROP TABLE t1,t2;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
# #
# Bug#43448 - Server crashes on multi table delete with Innodb # Bug#43448 - Server crashes on multi table delete with Innodb
# #
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
CREATE TABLE t1 ( CREATE TABLE t1 (
id1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, id1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
...@@ -29,4 +29,4 @@ DELETE t1, t2, t3 ...@@ -29,4 +29,4 @@ DELETE t1, t2, t3
FROM t1, t2, t3 FROM t1, t2, t3
WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5; WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5;
DROP TABLE t1, t2, t3; DROP TABLE t1, t2, t3;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
set storage_engine=innodb; set storage_engine=innodb;
set @save_time_zone= @@time_zone; set @save_time_zone= @@time_zone;
set time_zone='+03:00'; set time_zone='+03:00';
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2)); CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
INSERT INTO t1 VALUES('98-12-31 11:30:45','98.12.31 11+30+45','98-12-31 11:30:45','98.12.31 11+30+45'),('98/12/30 11*30*45','98@12@30 11^30^45','98/12/30 11*30*45','98@12@30 11^30^45'),('98-12-29','98.12.29','98-12-29','98.12.29'),('98/12/28','98@12@28','98/12/28','98@12@28'); INSERT INTO t1 VALUES('98-12-31 11:30:45','98.12.31 11+30+45','98-12-31 11:30:45','98.12.31 11+30+45'),('98/12/30 11*30*45','98@12@30 11^30^45','98/12/30 11*30*45','98@12@30 11^30^45'),('98-12-29','98.12.29','98-12-29','98.12.29'),('98/12/28','98@12@28','98/12/28','98@12@28');
...@@ -101,4 +101,4 @@ c1 c2 c3 c4 ...@@ -101,4 +101,4 @@ c1 c2 c3 c4
2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00 2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00
DROP TABLE t1; DROP TABLE t1;
set time_zone= @save_time_zone; set time_zone= @save_time_zone;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
--source include/have_innodb.inc --source include/have_innodb.inc
# crash requires this # crash requires this
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
create table `t1` (`c1` char(1) default null,`c2` char(10) default null, create table `t1` (`c1` char(1) default null,`c2` char(10) default null,
...@@ -13,4 +13,4 @@ engine=innodb default charset=latin1; ...@@ -13,4 +13,4 @@ engine=innodb default charset=latin1;
insert into `t1` values ('3',null); insert into `t1` values ('3',null);
select * from `t1` where `c1`='3' for update; select * from `t1` where `c1`='3' for update;
drop table `t1`; drop table `t1`;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_innodb.inc --source include/have_innodb.inc
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
# Crash requires that we enable Index Condition Pushdown in InnoDB # Crash requires that we enable Index Condition Pushdown in InnoDB
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
...@@ -20,4 +20,4 @@ INSERT INTO t VALUES (1,1,1),(3,3,3),(5,5,5); ...@@ -20,4 +20,4 @@ INSERT INTO t VALUES (1,1,1),(3,3,3),(5,5,5);
SELECT * FROM t WHERE a > 2 FOR UPDATE; SELECT * FROM t WHERE a > 2 FOR UPDATE;
DROP TABLE t; DROP TABLE t;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
--source include/have_innodb.inc --source include/have_innodb.inc
# crash requires this # crash requires this
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
drop table if exists `t1`; drop table if exists `t1`;
...@@ -13,4 +13,4 @@ create table `t1` (`c` bigint, key(`c`),`a` int)engine=innodb; ...@@ -13,4 +13,4 @@ create table `t1` (`c` bigint, key(`c`),`a` int)engine=innodb;
insert into `t1` values(2,2); insert into `t1` values(2,2);
delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ; delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ;
drop table `t1`; drop table `t1`;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
--source include/have_innodb.inc --source include/have_innodb.inc
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
# Valgrind errors happen only with this: # Valgrind errors happen only with this:
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
...@@ -247,4 +247,4 @@ UNLOCK TABLES; ...@@ -247,4 +247,4 @@ UNLOCK TABLES;
select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ; select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ;
drop table `table5`; drop table `table5`;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_innodb.inc --source include/have_innodb.inc
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY
...@@ -16,4 +16,4 @@ SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2; ...@@ -16,4 +16,4 @@ SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2;
SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2; SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2;
drop table `t1`; drop table `t1`;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_innodb.inc --source include/have_innodb.inc
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
# crash requires this # crash requires this
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
...@@ -43,4 +43,4 @@ SELECT * FROM t1; ...@@ -43,4 +43,4 @@ SELECT * FROM t1;
SELECT * FROM t2; SELECT * FROM t2;
DROP TABLE t1,t2; DROP TABLE t1,t2;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_innodb.inc --source include/have_innodb.inc
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
# crash requires ICP support in InnoDB # crash requires ICP support in InnoDB
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
...@@ -59,4 +59,4 @@ FROM t1, t2, t3 ...@@ -59,4 +59,4 @@ FROM t1, t2, t3
WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5; WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5;
DROP TABLE t1, t2, t3; DROP TABLE t1, t2, t3;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
set storage_engine=innodb; set storage_engine=innodb;
set @save_time_zone= @@time_zone; set @save_time_zone= @@time_zone;
set time_zone='+03:00'; set time_zone='+03:00';
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,optimizer_innodb_icp"; set session debug_dbug="+d,optimizer_innodb_icp";
######## Running INSERT tests for TIMESTAMP ######## ######## Running INSERT tests for TIMESTAMP ########
...@@ -84,4 +84,4 @@ SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER ...@@ -84,4 +84,4 @@ SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER
DROP TABLE t1; DROP TABLE t1;
set time_zone= @save_time_zone; set time_zone= @save_time_zone;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -22,7 +22,7 @@ current_user() ...@@ -22,7 +22,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set ...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'192.0.2.4'; revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -22,7 +22,7 @@ current_user() ...@@ -22,7 +22,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set ...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'192.0.2.4'; revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -22,7 +22,7 @@ current_user() ...@@ -22,7 +22,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN null ...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null LAST_ERROR_SEEN null
revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -24,7 +24,7 @@ current_user() ...@@ -24,7 +24,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -104,4 +104,4 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; ...@@ -104,4 +104,4 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
revoke select on test.* from 'root'@'192.0.2.4'; revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -24,7 +24,7 @@ current_user() ...@@ -24,7 +24,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
uninstall plugin test_plugin_server; uninstall plugin test_plugin_server;
ERROR HY000: Plugin 'test_plugin_server' is not loaded ERROR HY000: Plugin 'test_plugin_server' is not loaded
...@@ -195,5 +195,5 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com' ...@@ -195,5 +195,5 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
FROM 'plug'@'santa.claus.ipv4.example.com'; FROM 'plug'@'santa.claus.ipv4.example.com';
DROP USER 'plug'@'santa.claus.ipv4.example.com'; DROP USER 'plug'@'santa.claus.ipv4.example.com';
DROP USER 'plug_dest'@'santa.claus.ipv4.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
delete from mysql.plugin where name='test_plugin_server'; delete from mysql.plugin where name='test_plugin_server';
...@@ -25,7 +25,7 @@ current_user() ...@@ -25,7 +25,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply";
ERROR 08S01: Bad handshake ERROR 08S01: Bad handshake
connection default; connection default;
...@@ -428,4 +428,4 @@ drop user 'root'@'santa.claus.ipv4.example.com'; ...@@ -428,4 +428,4 @@ drop user 'root'@'santa.claus.ipv4.example.com';
revoke select on test.* from 'quota'@'santa.claus.ipv4.example.com'; revoke select on test.* from 'quota'@'santa.claus.ipv4.example.com';
drop user 'quota'@'santa.claus.ipv4.example.com'; drop user 'quota'@'santa.claus.ipv4.example.com';
set global max_connect_errors = @saved_max_connect_errors; set global max_connect_errors = @saved_max_connect_errors;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -25,7 +25,7 @@ current_user() ...@@ -25,7 +25,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
connect con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,; connect con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con2a is alive"; select "Con2a is alive";
...@@ -703,4 +703,4 @@ disconnect tmp_con7; ...@@ -703,4 +703,4 @@ disconnect tmp_con7;
set global max_connections = @saved_max_connections; set global max_connections = @saved_max_connections;
set global max_user_connections = @saved_max_user_connections; set global max_user_connections = @saved_max_user_connections;
drop user 'quota'@'santa.claus.ipv4.example.com'; drop user 'quota'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -24,7 +24,7 @@ current_user() ...@@ -24,7 +24,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -179,4 +179,4 @@ revoke select on test.* from 'root'@'192.0.2.4'; ...@@ -179,4 +179,4 @@ revoke select on test.* from 'root'@'192.0.2.4';
revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4';
drop user 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -143,4 +143,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -143,4 +143,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -22,7 +22,7 @@ current_user() ...@@ -22,7 +22,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set ...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'192.0.2.4'; revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -24,7 +24,7 @@ current_user() ...@@ -24,7 +24,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv4.example.com' (using password: YES) ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv4.example.com' (using password: YES)
connection default; connection default;
...@@ -208,4 +208,4 @@ FIRST_ERROR_SEEN set ...@@ -208,4 +208,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
drop user 'user_with'@'santa.claus.ipv4.example.com'; drop user 'user_with'@'santa.claus.ipv4.example.com';
drop user 'user_without'@'santa.claus.ipv4.example.com'; drop user 'user_without'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -28,7 +28,7 @@ current_user() ...@@ -28,7 +28,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv4.example.com' (using password: NO) ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv4.example.com' (using password: NO)
connection default; connection default;
...@@ -152,4 +152,4 @@ FIRST_ERROR_SEEN set ...@@ -152,4 +152,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
drop user 'user_ssl'@'santa.claus.ipv4.example.com'; drop user 'user_ssl'@'santa.claus.ipv4.example.com';
drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -22,7 +22,7 @@ current_user() ...@@ -22,7 +22,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
connect con2,"::1",root,,test,$MASTER_MYPORT,; connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set ...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'2001:db8::6:6'; revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -22,7 +22,7 @@ current_user() ...@@ -22,7 +22,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
connect con2,"::1",root,,test,$MASTER_MYPORT,; connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set ...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'2001:db8::6:6'; revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -22,7 +22,7 @@ current_user() ...@@ -22,7 +22,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
connect con2,"::1",root,,test,$MASTER_MYPORT,; connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN null ...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null LAST_ERROR_SEEN null
revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -19,7 +19,7 @@ current_user() ...@@ -19,7 +19,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -81,4 +81,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -81,4 +81,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -24,7 +24,7 @@ current_user() ...@@ -24,7 +24,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
connect con2,"::1",root,,test,$MASTER_MYPORT,; connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -104,4 +104,4 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; ...@@ -104,4 +104,4 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
revoke select on test.* from 'root'@'2001:db8::6:6'; revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -24,7 +24,7 @@ current_user() ...@@ -24,7 +24,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
uninstall plugin test_plugin_server; uninstall plugin test_plugin_server;
ERROR HY000: Plugin 'test_plugin_server' is not loaded ERROR HY000: Plugin 'test_plugin_server' is not loaded
...@@ -195,5 +195,5 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com' ...@@ -195,5 +195,5 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com'
FROM 'plug'@'santa.claus.ipv6.example.com'; FROM 'plug'@'santa.claus.ipv6.example.com';
DROP USER 'plug'@'santa.claus.ipv6.example.com'; DROP USER 'plug'@'santa.claus.ipv6.example.com';
DROP USER 'plug_dest'@'santa.claus.ipv6.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
delete from mysql.plugin where name='test_plugin_server'; delete from mysql.plugin where name='test_plugin_server';
...@@ -25,7 +25,7 @@ current_user() ...@@ -25,7 +25,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply";
ERROR 08S01: Bad handshake ERROR 08S01: Bad handshake
connection default; connection default;
...@@ -428,4 +428,4 @@ drop user 'root'@'santa.claus.ipv6.example.com'; ...@@ -428,4 +428,4 @@ drop user 'root'@'santa.claus.ipv6.example.com';
revoke select on test.* from 'quota'@'santa.claus.ipv6.example.com'; revoke select on test.* from 'quota'@'santa.claus.ipv6.example.com';
drop user 'quota'@'santa.claus.ipv6.example.com'; drop user 'quota'@'santa.claus.ipv6.example.com';
set global max_connect_errors = @saved_max_connect_errors; set global max_connect_errors = @saved_max_connect_errors;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -25,7 +25,7 @@ current_user() ...@@ -25,7 +25,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
connect con2a,"::1",quota,,test,$MASTER_MYPORT,; connect con2a,"::1",quota,,test,$MASTER_MYPORT,;
select "Con2a is alive"; select "Con2a is alive";
...@@ -703,4 +703,4 @@ disconnect tmp_con7; ...@@ -703,4 +703,4 @@ disconnect tmp_con7;
set global max_connections = @saved_max_connections; set global max_connections = @saved_max_connections;
set global max_user_connections = @saved_max_user_connections; set global max_user_connections = @saved_max_user_connections;
drop user 'quota'@'santa.claus.ipv6.example.com'; drop user 'quota'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -24,7 +24,7 @@ current_user() ...@@ -24,7 +24,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
connect con2,"::1",root,,test,$MASTER_MYPORT,; connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -179,4 +179,4 @@ revoke select on test.* from 'root'@'2001:db8::6:6'; ...@@ -179,4 +179,4 @@ revoke select on test.* from 'root'@'2001:db8::6:6';
revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6';
drop user 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -143,4 +143,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -143,4 +143,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -22,7 +22,7 @@ current_user() ...@@ -22,7 +22,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
connect con2,"::1",root,,test,$MASTER_MYPORT,; connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive"; select "Con2 is alive";
...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set ...@@ -100,4 +100,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'2001:db8::6:6'; revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -20,7 +20,7 @@ current_user() ...@@ -20,7 +20,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
connection default; connection default;
...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 ...@@ -82,4 +82,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0 COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -24,7 +24,7 @@ current_user() ...@@ -24,7 +24,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv6.example.com' (using password: YES) ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv6.example.com' (using password: YES)
connection default; connection default;
...@@ -208,4 +208,4 @@ FIRST_ERROR_SEEN set ...@@ -208,4 +208,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
drop user 'user_with'@'santa.claus.ipv6.example.com'; drop user 'user_with'@'santa.claus.ipv6.example.com';
drop user 'user_without'@'santa.claus.ipv6.example.com'; drop user 'user_without'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -28,7 +28,7 @@ current_user() ...@@ -28,7 +28,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv6.example.com' (using password: NO) ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv6.example.com' (using password: NO)
connection default; connection default;
...@@ -152,4 +152,4 @@ FIRST_ERROR_SEEN set ...@@ -152,4 +152,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set LAST_ERROR_SEEN set
drop user 'user_ssl'@'santa.claus.ipv6.example.com'; drop user 'user_ssl'@'santa.claus.ipv6.example.com';
drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -27,7 +27,7 @@ current_user() ...@@ -27,7 +27,7 @@ current_user()
root@localhost root@localhost
disconnect con1; disconnect con1;
connection default; connection default;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_error"; set global debug_dbug= "+d,vio_peer_addr_error";
ERROR HY000: Can't get hostname for your address ERROR HY000: Can't get hostname for your address
connection default; connection default;
...@@ -51,7 +51,7 @@ Connection_errors_peer_address 2 ...@@ -51,7 +51,7 @@ Connection_errors_peer_address 2
Connection_errors_select 0 Connection_errors_select 0
Connection_errors_tcpwrap 0 Connection_errors_tcpwrap 0
"Dumping performance_schema.host_cache" "Dumping performance_schema.host_cache"
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
flush status; flush status;
show global status like "connection_errors_%"; show global status like "connection_errors_%";
Variable_name Value Variable_name Value
......
...@@ -27,7 +27,7 @@ select current_user(); ...@@ -27,7 +27,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
...@@ -49,5 +49,5 @@ disconnect con3; ...@@ -49,5 +49,5 @@ disconnect con3;
revoke select on test.* from 'root'@'192.0.2.4'; revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -25,7 +25,7 @@ select current_user(); ...@@ -25,7 +25,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
--disable_query_log --disable_query_log
...@@ -44,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); ...@@ -44,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -30,7 +30,7 @@ select current_user(); ...@@ -30,7 +30,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
...@@ -52,5 +52,5 @@ disconnect con3; ...@@ -52,5 +52,5 @@ disconnect con3;
revoke select on test.* from 'root'@'192.0.2.4'; revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -27,7 +27,7 @@ select current_user(); ...@@ -27,7 +27,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
--disable_query_log --disable_query_log
...@@ -46,5 +46,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); ...@@ -46,5 +46,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -28,7 +28,7 @@ select current_user(); ...@@ -28,7 +28,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
...@@ -50,5 +50,5 @@ disconnect con3; ...@@ -50,5 +50,5 @@ disconnect con3;
revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -25,7 +25,7 @@ select current_user(); ...@@ -25,7 +25,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
--disable_query_log --disable_query_log
...@@ -44,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); ...@@ -44,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -30,7 +30,7 @@ select current_user(); ...@@ -30,7 +30,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
...@@ -54,5 +54,5 @@ revoke select on test.* from 'root'@'192.0.2.4'; ...@@ -54,5 +54,5 @@ revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -25,7 +25,7 @@ select current_user(); ...@@ -25,7 +25,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
--disable_query_log --disable_query_log
...@@ -44,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); ...@@ -44,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -30,7 +30,7 @@ select current_user(); ...@@ -30,7 +30,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
uninstall plugin test_plugin_server; uninstall plugin test_plugin_server;
...@@ -87,6 +87,6 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com' ...@@ -87,6 +87,6 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
DROP USER 'plug'@'santa.claus.ipv4.example.com'; DROP USER 'plug'@'santa.claus.ipv4.example.com';
DROP USER 'plug_dest'@'santa.claus.ipv4.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
delete from mysql.plugin where name='test_plugin_server'; delete from mysql.plugin where name='test_plugin_server';
...@@ -33,7 +33,7 @@ select current_user(); ...@@ -33,7 +33,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply";
--disable_query_log --disable_query_log
...@@ -157,5 +157,5 @@ revoke select on test.* from 'quota'@'santa.claus.ipv4.example.com'; ...@@ -157,5 +157,5 @@ revoke select on test.* from 'quota'@'santa.claus.ipv4.example.com';
drop user 'quota'@'santa.claus.ipv4.example.com'; drop user 'quota'@'santa.claus.ipv4.example.com';
set global max_connect_errors = @saved_max_connect_errors; set global max_connect_errors = @saved_max_connect_errors;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -24,7 +24,7 @@ select current_user(); ...@@ -24,7 +24,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4";
--disable_query_log --disable_query_log
...@@ -43,5 +43,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); ...@@ -43,5 +43,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -31,7 +31,7 @@ select current_user(); ...@@ -31,7 +31,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
connect (con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,); connect (con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
...@@ -260,5 +260,5 @@ set global max_user_connections = @saved_max_user_connections; ...@@ -260,5 +260,5 @@ set global max_user_connections = @saved_max_user_connections;
# revoke all privileges on test.* from 'quota'@'santa.claus.ipv4.example.com'; # revoke all privileges on test.* from 'quota'@'santa.claus.ipv4.example.com';
drop user 'quota'@'santa.claus.ipv4.example.com'; drop user 'quota'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -30,7 +30,7 @@ select current_user(); ...@@ -30,7 +30,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
...@@ -72,5 +72,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; ...@@ -72,5 +72,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4';
drop user 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -25,7 +25,7 @@ select current_user(); ...@@ -25,7 +25,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
--disable_query_log --disable_query_log
...@@ -62,5 +62,5 @@ connect (con5,"127.0.0.1",root,,test,$MASTER_MYPORT,); ...@@ -62,5 +62,5 @@ connect (con5,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -28,7 +28,7 @@ select current_user(); ...@@ -28,7 +28,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
...@@ -50,5 +50,5 @@ disconnect con3; ...@@ -50,5 +50,5 @@ disconnect con3;
revoke select on test.* from 'root'@'192.0.2.4'; revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -25,7 +25,7 @@ select current_user(); ...@@ -25,7 +25,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
--disable_query_log --disable_query_log
...@@ -44,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); ...@@ -44,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -29,7 +29,7 @@ select current_user(); ...@@ -29,7 +29,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
--disable_query_log --disable_query_log
...@@ -83,5 +83,5 @@ connect (con2f,"127.0.0.1",user_with,wrong_password,test,$MASTER_MYPORT,); ...@@ -83,5 +83,5 @@ connect (con2f,"127.0.0.1",user_with,wrong_password,test,$MASTER_MYPORT,);
drop user 'user_with'@'santa.claus.ipv4.example.com'; drop user 'user_with'@'santa.claus.ipv4.example.com';
drop user 'user_without'@'santa.claus.ipv4.example.com'; drop user 'user_without'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -30,7 +30,7 @@ select current_user(); ...@@ -30,7 +30,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
--disable_query_log --disable_query_log
...@@ -68,5 +68,5 @@ connect (con2d,"127.0.0.1",user_ssl_x509,good_password,test,$MASTER_MYPORT,,SSL) ...@@ -68,5 +68,5 @@ connect (con2d,"127.0.0.1",user_ssl_x509,good_password,test,$MASTER_MYPORT,,SSL)
drop user 'user_ssl'@'santa.claus.ipv4.example.com'; drop user 'user_ssl'@'santa.claus.ipv4.example.com';
drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -29,7 +29,7 @@ select current_user(); ...@@ -29,7 +29,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
connect (con2,"::1",root,,test,$MASTER_MYPORT,); connect (con2,"::1",root,,test,$MASTER_MYPORT,);
...@@ -51,5 +51,5 @@ disconnect con3; ...@@ -51,5 +51,5 @@ disconnect con3;
revoke select on test.* from 'root'@'2001:db8::6:6'; revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -26,7 +26,7 @@ select current_user(); ...@@ -26,7 +26,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
--disable_query_log --disable_query_log
...@@ -45,5 +45,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,); ...@@ -45,5 +45,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -31,7 +31,7 @@ select current_user(); ...@@ -31,7 +31,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
connect (con2,"::1",root,,test,$MASTER_MYPORT,); connect (con2,"::1",root,,test,$MASTER_MYPORT,);
...@@ -53,5 +53,5 @@ disconnect con3; ...@@ -53,5 +53,5 @@ disconnect con3;
revoke select on test.* from 'root'@'2001:db8::6:6'; revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -28,7 +28,7 @@ select current_user(); ...@@ -28,7 +28,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
--disable_query_log --disable_query_log
...@@ -47,5 +47,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,); ...@@ -47,5 +47,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -29,7 +29,7 @@ select current_user(); ...@@ -29,7 +29,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
connect (con2,"::1",root,,test,$MASTER_MYPORT,); connect (con2,"::1",root,,test,$MASTER_MYPORT,);
...@@ -51,5 +51,5 @@ disconnect con3; ...@@ -51,5 +51,5 @@ disconnect con3;
revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -22,7 +22,7 @@ select current_user(); ...@@ -22,7 +22,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
--disable_query_log --disable_query_log
...@@ -41,5 +41,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,); ...@@ -41,5 +41,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -31,7 +31,7 @@ select current_user(); ...@@ -31,7 +31,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
connect (con2,"::1",root,,test,$MASTER_MYPORT,); connect (con2,"::1",root,,test,$MASTER_MYPORT,);
...@@ -55,4 +55,4 @@ revoke select on test.* from 'root'@'2001:db8::6:6'; ...@@ -55,4 +55,4 @@ revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -26,7 +26,7 @@ select current_user(); ...@@ -26,7 +26,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
--disable_query_log --disable_query_log
...@@ -45,4 +45,4 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,); ...@@ -45,4 +45,4 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -31,7 +31,7 @@ select current_user(); ...@@ -31,7 +31,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
uninstall plugin test_plugin_server; uninstall plugin test_plugin_server;
...@@ -88,6 +88,6 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com' ...@@ -88,6 +88,6 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com'
DROP USER 'plug'@'santa.claus.ipv6.example.com'; DROP USER 'plug'@'santa.claus.ipv6.example.com';
DROP USER 'plug_dest'@'santa.claus.ipv6.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
delete from mysql.plugin where name='test_plugin_server'; delete from mysql.plugin where name='test_plugin_server';
...@@ -33,7 +33,7 @@ select current_user(); ...@@ -33,7 +33,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply";
--disable_query_log --disable_query_log
...@@ -157,5 +157,5 @@ revoke select on test.* from 'quota'@'santa.claus.ipv6.example.com'; ...@@ -157,5 +157,5 @@ revoke select on test.* from 'quota'@'santa.claus.ipv6.example.com';
drop user 'quota'@'santa.claus.ipv6.example.com'; drop user 'quota'@'santa.claus.ipv6.example.com';
set global max_connect_errors = @saved_max_connect_errors; set global max_connect_errors = @saved_max_connect_errors;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -32,7 +32,7 @@ select current_user(); ...@@ -32,7 +32,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
connect (con2a,"::1",quota,,test,$MASTER_MYPORT,); connect (con2a,"::1",quota,,test,$MASTER_MYPORT,);
...@@ -242,5 +242,5 @@ set global max_user_connections = @saved_max_user_connections; ...@@ -242,5 +242,5 @@ set global max_user_connections = @saved_max_user_connections;
# revoke all privileges on test.* from 'quota'@'santa.claus.ipv6.example.com'; # revoke all privileges on test.* from 'quota'@'santa.claus.ipv6.example.com';
drop user 'quota'@'santa.claus.ipv6.example.com'; drop user 'quota'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -31,7 +31,7 @@ select current_user(); ...@@ -31,7 +31,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
connect (con2,"::1",root,,test,$MASTER_MYPORT,); connect (con2,"::1",root,,test,$MASTER_MYPORT,);
...@@ -73,5 +73,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; ...@@ -73,5 +73,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6';
drop user 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -26,7 +26,7 @@ select current_user(); ...@@ -26,7 +26,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
--disable_query_log --disable_query_log
...@@ -63,5 +63,5 @@ connect (con5,"::1",root,,test,$MASTER_MYPORT,); ...@@ -63,5 +63,5 @@ connect (con5,"::1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -29,7 +29,7 @@ select current_user(); ...@@ -29,7 +29,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
connect (con2,"::1",root,,test,$MASTER_MYPORT,); connect (con2,"::1",root,,test,$MASTER_MYPORT,);
...@@ -51,5 +51,5 @@ disconnect con3; ...@@ -51,5 +51,5 @@ disconnect con3;
revoke select on test.* from 'root'@'2001:db8::6:6'; revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -26,7 +26,7 @@ select current_user(); ...@@ -26,7 +26,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
--disable_query_log --disable_query_log
...@@ -45,5 +45,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,); ...@@ -45,5 +45,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default --connection default
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -27,7 +27,7 @@ select current_user(); ...@@ -27,7 +27,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
--disable_query_log --disable_query_log
...@@ -81,5 +81,5 @@ connect (con2f,"::1",user_with,wrong_password,test,$MASTER_MYPORT,); ...@@ -81,5 +81,5 @@ connect (con2f,"::1",user_with,wrong_password,test,$MASTER_MYPORT,);
drop user 'user_with'@'santa.claus.ipv6.example.com'; drop user 'user_with'@'santa.claus.ipv6.example.com';
drop user 'user_without'@'santa.claus.ipv6.example.com'; drop user 'user_without'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -31,7 +31,7 @@ select current_user(); ...@@ -31,7 +31,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
--disable_query_log --disable_query_log
...@@ -69,5 +69,5 @@ connect (con2d,"::1",user_ssl_x509,good_password,test,$MASTER_MYPORT,,SSL); ...@@ -69,5 +69,5 @@ connect (con2d,"::1",user_ssl_x509,good_password,test,$MASTER_MYPORT,,SSL);
drop user 'user_ssl'@'santa.claus.ipv6.example.com'; drop user 'user_ssl'@'santa.claus.ipv6.example.com';
drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
...@@ -22,7 +22,7 @@ select current_user(); ...@@ -22,7 +22,7 @@ select current_user();
disconnect con1; disconnect con1;
--connection default --connection default
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= "+d,vio_peer_addr_error"; set global debug_dbug= "+d,vio_peer_addr_error";
--disable_query_log --disable_query_log
...@@ -43,7 +43,7 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); ...@@ -43,7 +43,7 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
show global status like "connection_errors_%"; show global status like "connection_errors_%";
--source ../include/hostcache_dump.inc --source ../include/hostcache_dump.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
flush status; flush status;
show global status like "connection_errors_%"; show global status like "connection_errors_%";
......
...@@ -4,7 +4,7 @@ connection master; ...@@ -4,7 +4,7 @@ connection master;
create table t1 (a int); create table t1 (a int);
connection slave; connection slave;
connection slave; connection slave;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug='d,rows_log_event_before_open_table'; set global debug_dbug='d,rows_log_event_before_open_table';
connection master; connection master;
insert t1 values (1),(2),(3); insert t1 values (1),(2),(3);
...@@ -14,7 +14,7 @@ kill slave_sql_thread; ...@@ -14,7 +14,7 @@ kill slave_sql_thread;
set debug_sync='now SIGNAL go_ahead_sql'; set debug_sync='now SIGNAL go_ahead_sql';
include/wait_for_slave_sql_error.inc [errno=1927] include/wait_for_slave_sql_error.inc [errno=1927]
Last_SQL_Error = Error executing row event: 'Connection was killed' Last_SQL_Error = Error executing row event: 'Connection was killed'
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
set debug_sync='RESET'; set debug_sync='RESET';
connection master; connection master;
drop table t1; drop table t1;
......
...@@ -5,11 +5,11 @@ call mtr.add_suppression("Failed during slave I/O thread initialization"); ...@@ -5,11 +5,11 @@ call mtr.add_suppression("Failed during slave I/O thread initialization");
call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* 1593"); call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* 1593");
include/stop_slave.inc include/stop_slave.inc
reset slave; reset slave;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; SET GLOBAL debug_dbug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
start slave; start slave;
include/wait_for_slave_sql_error.inc [errno=1593] include/wait_for_slave_sql_error.inc [errno=1593]
Last_SQL_Error = 'Failed during slave thread initialization' Last_SQL_Error = 'Failed during slave thread initialization'
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
RESET SLAVE; RESET SLAVE;
include/rpl_end.inc include/rpl_end.inc
...@@ -2,7 +2,7 @@ include/master-slave.inc ...@@ -2,7 +2,7 @@ include/master-slave.inc
[connection master] [connection master]
connection slave; connection slave;
stop slave; stop slave;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET @@debug_dbug="d,simulate_find_log_pos_error"; SET @@debug_dbug="d,simulate_find_log_pos_error";
reset slave; reset slave;
ERROR HY000: Target log not found in binlog index ERROR HY000: Target log not found in binlog index
...@@ -20,7 +20,7 @@ SET @@debug_dbug=""; ...@@ -20,7 +20,7 @@ SET @@debug_dbug="";
reset slave; reset slave;
change master to master_host='dummy'; change master to master_host='dummy';
connection master; connection master;
set @saved_dbug_m = @@global.debug_dbug; SET @saved_dbug_m = @@global.debug_dbug;
SET @@debug_dbug="d,simulate_find_log_pos_error"; SET @@debug_dbug="d,simulate_find_log_pos_error";
reset master; reset master;
ERROR HY000: Target log not found in binlog index ERROR HY000: Target log not found in binlog index
...@@ -31,7 +31,7 @@ purge binary logs to 'master-bin.000001'; ...@@ -31,7 +31,7 @@ purge binary logs to 'master-bin.000001';
ERROR HY000: Target log not found in binlog index ERROR HY000: Target log not found in binlog index
SET @@debug_dbug=""; SET @@debug_dbug="";
purge binary logs to 'master-bin.000001'; purge binary logs to 'master-bin.000001';
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
==== clean up ==== ==== clean up ====
CHANGE MASTER TO MASTER_HOST = '127.0.0.1'; CHANGE MASTER TO MASTER_HOST = '127.0.0.1';
include/rpl_end.inc include/rpl_end.inc
...@@ -93,7 +93,7 @@ set @save_dbug = @@session.debug_dbug; ...@@ -93,7 +93,7 @@ set @save_dbug = @@session.debug_dbug;
set @@session.debug_dbug='d,simulate_checksum_test_failure'; set @@session.debug_dbug='d,simulate_checksum_test_failure';
show binlog events; show binlog events;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
set debug_dbug= @save_dbug; SET debug_dbug= @save_dbug;
set @@global.master_verify_checksum = default; set @@global.master_verify_checksum = default;
connection slave; connection slave;
connection slave; connection slave;
......
...@@ -2,7 +2,7 @@ include/master-slave.inc ...@@ -2,7 +2,7 @@ include/master-slave.inc
[connection master] [connection master]
connection master; connection master;
include/rpl_restart_server.inc [server_number=1] include/rpl_restart_server.inc [server_number=1]
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET @@debug_dbug="d,simulate_big_table_id"; SET @@debug_dbug="d,simulate_big_table_id";
CREATE TABLE t (a int); CREATE TABLE t (a int);
INSERT INTO t SET a= 0; INSERT INTO t SET a= 0;
...@@ -43,6 +43,6 @@ master-bin.000002 # Query 1 # COMMIT ...@@ -43,6 +43,6 @@ master-bin.000002 # Query 1 # COMMIT
connection slave; connection slave;
connection master; connection master;
DROP TABLE t; DROP TABLE t;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
connection slave; connection slave;
include/rpl_end.inc include/rpl_end.inc
...@@ -2,7 +2,7 @@ include/master-slave.inc ...@@ -2,7 +2,7 @@ include/master-slave.inc
[connection master] [connection master]
connection slave; connection slave;
include/stop_slave.inc include/stop_slave.inc
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL log_warnings = 2; SET GLOBAL log_warnings = 2;
SET GLOBAL debug_dbug="d,inject_long_find_row_note"; SET GLOBAL debug_dbug="d,inject_long_find_row_note";
include/start_slave.inc include/start_slave.inc
...@@ -18,7 +18,7 @@ connection slave; ...@@ -18,7 +18,7 @@ connection slave;
# Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log # Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log
Occurrences: update=1, delete=1 Occurrences: update=1, delete=1
include/stop_slave.inc include/stop_slave.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
SET GLOBAL log_warnings = 2; SET GLOBAL log_warnings = 2;
include/start_slave.inc include/start_slave.inc
include/rpl_end.inc include/rpl_end.inc
...@@ -11,7 +11,7 @@ SET @@GLOBAL.rpl_semi_sync_slave_enabled = 1; ...@@ -11,7 +11,7 @@ SET @@GLOBAL.rpl_semi_sync_slave_enabled = 1;
include/start_slave.inc include/start_slave.inc
connection master; connection master;
CREATE TABLE t1 (a INT) ENGINE=innodb; CREATE TABLE t1 (a INT) ENGINE=innodb;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET @@GLOBAL.debug_dbug="d,dbug_master_binlog_over_2GB"; SET @@GLOBAL.debug_dbug="d,dbug_master_binlog_over_2GB";
SET @@SESSION.skip_replication=1; SET @@SESSION.skip_replication=1;
INSERT INTO t1 SET a=1; INSERT INTO t1 SET a=1;
...@@ -21,7 +21,7 @@ SET @@GLOBAL.debug_dbug=""; ...@@ -21,7 +21,7 @@ SET @@GLOBAL.debug_dbug="";
FLUSH LOGS; FLUSH LOGS;
connection slave; connection slave;
connection master; connection master;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
SET @@GLOBAL.rpl_semi_sync_master_timeout = 10000; SET @@GLOBAL.rpl_semi_sync_master_timeout = 10000;
SET @@GLOBAL.rpl_semi_sync_master_enabled = 0; SET @@GLOBAL.rpl_semi_sync_master_enabled = 0;
connection master; connection master;
......
...@@ -3,7 +3,7 @@ include/master-slave.inc ...@@ -3,7 +3,7 @@ include/master-slave.inc
connection slave; connection slave;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
include/stop_slave.inc include/stop_slave.inc
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= 'd,dbug.before_get_running_status_yes'; set global debug_dbug= 'd,dbug.before_get_running_status_yes';
Slave_running, Slave_IO_Running, Slave_SQL_Running, must be OFF, NO, NO in three following queries Slave_running, Slave_IO_Running, Slave_SQL_Running, must be OFF, NO, NO in three following queries
SHOW STATUS LIKE 'Slave_running'; SHOW STATUS LIKE 'Slave_running';
...@@ -35,7 +35,7 @@ Slave_running ON ...@@ -35,7 +35,7 @@ Slave_running ON
Slave_IO_Running= Yes Slave_IO_Running= Yes
Slave_SQL_Running= Yes Slave_SQL_Running= Yes
connection slave; connection slave;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
End of tests End of tests
include/rpl_end.inc include/rpl_end.inc
...@@ -15,7 +15,7 @@ include/stop_slave.inc ...@@ -15,7 +15,7 @@ include/stop_slave.inc
# Suspend the INSERT statement in current transaction on SQL thread. # Suspend the INSERT statement in current transaction on SQL thread.
# It guarantees that SQL thread is applying the transaction when # It guarantees that SQL thread is applying the transaction when
# STOP SLAVE command launchs. # STOP SLAVE command launchs.
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug= '+d,after_mysql_insert,*'; SET GLOBAL debug_dbug= '+d,after_mysql_insert,*';
include/start_slave.inc include/start_slave.inc
...@@ -75,7 +75,7 @@ connection master; ...@@ -75,7 +75,7 @@ connection master;
connection slave; connection slave;
# Test end # Test end
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
include/restart_slave.inc include/restart_slave.inc
connection slave; connection slave;
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
...@@ -100,7 +100,7 @@ connection slave; ...@@ -100,7 +100,7 @@ connection slave;
include/stop_slave.inc include/stop_slave.inc
connection master; connection master;
include/stop_dump_threads.inc include/stop_dump_threads.inc
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*'; SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*';
connection slave; connection slave;
include/start_slave.inc include/start_slave.inc
...@@ -123,7 +123,7 @@ connection slave; ...@@ -123,7 +123,7 @@ connection slave;
include/wait_for_slave_to_stop.inc include/wait_for_slave_to_stop.inc
connection slave1; connection slave1;
connection master; connection master;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
include/stop_dump_threads.inc include/stop_dump_threads.inc
connection slave1; connection slave1;
include/start_slave.inc include/start_slave.inc
......
...@@ -21,7 +21,7 @@ Tables_in_test ...@@ -21,7 +21,7 @@ Tables_in_test
t1 t1
v1 v1
connection master; connection master;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set @@debug_dbug="d,simulate_register_view_failure"; set @@debug_dbug="d,simulate_register_view_failure";
CREATE VIEW v2 as SELECT * FROM t1; CREATE VIEW v2 as SELECT * FROM t1;
ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
...@@ -37,5 +37,5 @@ v1 ...@@ -37,5 +37,5 @@ v1
connection master; connection master;
DROP VIEW IF EXISTS v1; DROP VIEW IF EXISTS v1;
DROP TABLE t1; DROP TABLE t1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
include/rpl_end.inc include/rpl_end.inc
...@@ -7,7 +7,7 @@ create table t1 (a int); ...@@ -7,7 +7,7 @@ create table t1 (a int);
--sync_slave_with_master --sync_slave_with_master
connection slave; connection slave;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug='d,rows_log_event_before_open_table'; set global debug_dbug='d,rows_log_event_before_open_table';
connection master; connection master;
...@@ -23,7 +23,7 @@ set debug_sync='now SIGNAL go_ahead_sql'; ...@@ -23,7 +23,7 @@ set debug_sync='now SIGNAL go_ahead_sql';
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
--echo Last_SQL_Error = $error --echo Last_SQL_Error = $error
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
set debug_sync='RESET'; set debug_sync='RESET';
connection master; connection master;
drop table t1; drop table t1;
......
...@@ -15,7 +15,7 @@ call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* ...@@ -15,7 +15,7 @@ call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.*
reset slave; reset slave;
# Set debug flags on slave to force errors to occur # Set debug flags on slave to force errors to occur
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; SET GLOBAL debug_dbug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
--disable_query_log --disable_query_log
...@@ -40,7 +40,7 @@ start slave; ...@@ -40,7 +40,7 @@ start slave;
# #
# Cleanup # Cleanup
# #
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
# Clear Last_SQL_Error # Clear Last_SQL_Error
RESET SLAVE; RESET SLAVE;
......
...@@ -15,7 +15,7 @@ source include/master-slave.inc; ...@@ -15,7 +15,7 @@ source include/master-slave.inc;
connection slave; connection slave;
stop slave; stop slave;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET @@debug_dbug="d,simulate_find_log_pos_error"; SET @@debug_dbug="d,simulate_find_log_pos_error";
--error ER_UNKNOWN_TARGET_BINLOG --error ER_UNKNOWN_TARGET_BINLOG
...@@ -36,7 +36,7 @@ reset slave; ...@@ -36,7 +36,7 @@ reset slave;
change master to master_host='dummy'; change master to master_host='dummy';
connection master; connection master;
set @saved_dbug_m = @@global.debug_dbug; SET @saved_dbug_m = @@global.debug_dbug;
SET @@debug_dbug="d,simulate_find_log_pos_error"; SET @@debug_dbug="d,simulate_find_log_pos_error";
--error ER_UNKNOWN_TARGET_BINLOG --error ER_UNKNOWN_TARGET_BINLOG
reset master; reset master;
...@@ -59,7 +59,7 @@ connection slave; ...@@ -59,7 +59,7 @@ connection slave;
call mtr.add_suppression("Failed to locate old binlog or relay log files"); call mtr.add_suppression("Failed to locate old binlog or relay log files");
call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ..master-bin.000001 not listed in the index"); call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ..master-bin.000001 not listed in the index");
--enable_query_log --enable_query_log
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
--echo ==== clean up ==== --echo ==== clean up ====
CHANGE MASTER TO MASTER_HOST = '127.0.0.1'; CHANGE MASTER TO MASTER_HOST = '127.0.0.1';
......
...@@ -26,7 +26,7 @@ call mtr.add_suppression("Fatal error: The slave I/O thread stops because master ...@@ -26,7 +26,7 @@ call mtr.add_suppression("Fatal error: The slave I/O thread stops because master
call mtr.add_suppression("Slave I/O thread .* register on master"); call mtr.add_suppression("Slave I/O thread .* register on master");
#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection #Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
# set up two parameters to pass into extra/rpl_tests/rpl_get_master_version_and_clock # set up two parameters to pass into extra/rpl_tests/rpl_get_master_version_and_clock
let $dbug_sync_point= 'debug_lock.before_get_UNIX_TIMESTAMP'; let $dbug_sync_point= 'debug_lock.before_get_UNIX_TIMESTAMP';
...@@ -42,7 +42,7 @@ source extra/rpl_tests/rpl_get_master_version_and_clock.test; ...@@ -42,7 +42,7 @@ source extra/rpl_tests/rpl_get_master_version_and_clock.test;
# cleanup # cleanup
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
# is not really necessary but avoids mtr post-run env check warnings # is not really necessary but avoids mtr post-run env check warnings
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
--let $rpl_server_number= 1 --let $rpl_server_number= 1
--source include/rpl_restart_server.inc --source include/rpl_restart_server.inc
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET @@debug_dbug="d,simulate_big_table_id"; SET @@debug_dbug="d,simulate_big_table_id";
CREATE TABLE t (a int); CREATE TABLE t (a int);
...@@ -52,7 +52,7 @@ if (`SELECT sum(a) != 6 FROM t`) ...@@ -52,7 +52,7 @@ if (`SELECT sum(a) != 6 FROM t`)
--connection master --connection master
DROP TABLE t; DROP TABLE t;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
--sync_slave_with_master --sync_slave_with_master
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# - setup log_warnings and debug # - setup log_warnings and debug
--connection slave --connection slave
--source include/stop_slave.inc --source include/stop_slave.inc
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
--let $log_warnings_save= `SELECT @@GLOBAL.log_warnings` --let $log_warnings_save= `SELECT @@GLOBAL.log_warnings`
SET GLOBAL log_warnings = 2; SET GLOBAL log_warnings = 2;
...@@ -55,7 +55,7 @@ EOF ...@@ -55,7 +55,7 @@ EOF
# cleanup # cleanup
--source include/stop_slave.inc --source include/stop_slave.inc
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
--eval SET GLOBAL log_warnings = $log_warnings_save --eval SET GLOBAL log_warnings = $log_warnings_save
--source include/start_slave.inc --source include/start_slave.inc
......
...@@ -47,7 +47,7 @@ sync_slave_with_master; ...@@ -47,7 +47,7 @@ sync_slave_with_master;
connection slave; connection slave;
ANALYZE TABLE t2; ANALYZE TABLE t2;
--echo # Slave will crash if using the wrong or no index --echo # Slave will crash if using the wrong or no index
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan"; SET GLOBAL debug_dbug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan";
connection master; connection master;
...@@ -239,5 +239,5 @@ connection master; ...@@ -239,5 +239,5 @@ connection master;
DROP TABLE t1; DROP TABLE t1;
sync_slave_with_master; sync_slave_with_master;
connection slave; connection slave;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -33,7 +33,7 @@ source include/start_slave.inc; ...@@ -33,7 +33,7 @@ source include/start_slave.inc;
CREATE TABLE t1 (a INT) ENGINE=innodb; CREATE TABLE t1 (a INT) ENGINE=innodb;
# Make the following events as if they offset over 2GB from the beginning of binlog # Make the following events as if they offset over 2GB from the beginning of binlog
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET @@GLOBAL.debug_dbug="d,dbug_master_binlog_over_2GB"; SET @@GLOBAL.debug_dbug="d,dbug_master_binlog_over_2GB";
SET @@SESSION.skip_replication=1; SET @@SESSION.skip_replication=1;
INSERT INTO t1 SET a=1; INSERT INTO t1 SET a=1;
...@@ -51,7 +51,7 @@ FLUSH LOGS; ...@@ -51,7 +51,7 @@ FLUSH LOGS;
# Clean up # Clean up
# #
--connection master --connection master
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
--eval SET @@GLOBAL.rpl_semi_sync_master_timeout = $sav_timeout_master --eval SET @@GLOBAL.rpl_semi_sync_master_timeout = $sav_timeout_master
--eval SET @@GLOBAL.rpl_semi_sync_master_enabled = $sav_enabled_master --eval SET @@GLOBAL.rpl_semi_sync_master_enabled = $sav_enabled_master
......
...@@ -11,7 +11,7 @@ connection slave; ...@@ -11,7 +11,7 @@ connection slave;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
source include/stop_slave.inc; source include/stop_slave.inc;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set global debug_dbug= 'd,dbug.before_get_running_status_yes'; # to block due-started IO set global debug_dbug= 'd,dbug.before_get_running_status_yes'; # to block due-started IO
# Test 1. Slave is stopped # Test 1. Slave is stopped
...@@ -77,7 +77,7 @@ echo Slave_SQL_Running= $status; ...@@ -77,7 +77,7 @@ echo Slave_SQL_Running= $status;
connection slave; connection slave;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
--echo End of tests --echo End of tests
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
########################################################################## ##########################################################################
connection slave; connection slave;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET @@global.debug_dbug= '+d,remove_slave_load_file_before_write'; SET @@global.debug_dbug= '+d,remove_slave_load_file_before_write';
connection master; connection master;
...@@ -74,7 +74,7 @@ call mtr.add_suppression("Slave: File.* not found.*"); ...@@ -74,7 +74,7 @@ call mtr.add_suppression("Slave: File.* not found.*");
call mtr.add_suppression("Slave SQL: Error .File.* not found.* error.* 29"); call mtr.add_suppression("Slave SQL: Error .File.* not found.* error.* 29");
--let $rpl_only_running_threads= 1 --let $rpl_only_running_threads= 1
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -22,7 +22,7 @@ source include/stop_slave.inc; ...@@ -22,7 +22,7 @@ source include/stop_slave.inc;
--echo # Suspend the INSERT statement in current transaction on SQL thread. --echo # Suspend the INSERT statement in current transaction on SQL thread.
--echo # It guarantees that SQL thread is applying the transaction when --echo # It guarantees that SQL thread is applying the transaction when
--echo # STOP SLAVE command launchs. --echo # STOP SLAVE command launchs.
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug= '+d,after_mysql_insert,*'; SET GLOBAL debug_dbug= '+d,after_mysql_insert,*';
source include/start_slave.inc; source include/start_slave.inc;
...@@ -44,7 +44,7 @@ source extra/rpl_tests/rpl_stop_slave.test; ...@@ -44,7 +44,7 @@ source extra/rpl_tests/rpl_stop_slave.test;
--echo --echo
--echo # Test end --echo # Test end
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
source include/restart_slave_sql.inc; source include/restart_slave_sql.inc;
connection slave; connection slave;
...@@ -77,7 +77,7 @@ connection master; ...@@ -77,7 +77,7 @@ connection master;
# make sure that there are no zombie threads # make sure that there are no zombie threads
--source include/stop_dump_threads.inc --source include/stop_dump_threads.inc
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*'; SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*';
connection slave; connection slave;
...@@ -124,7 +124,7 @@ reap; ...@@ -124,7 +124,7 @@ reap;
# sure that we disable the DBUG_EXECUTE_IF # sure that we disable the DBUG_EXECUTE_IF
# that would set the dump thread to wait # that would set the dump thread to wait
connection master; connection master;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
# make sure that there are no zombie threads # make sure that there are no zombie threads
--source include/stop_dump_threads.inc --source include/stop_dump_threads.inc
......
...@@ -18,7 +18,7 @@ sync_slave_with_master; ...@@ -18,7 +18,7 @@ sync_slave_with_master;
# view already has to be on slave # view already has to be on slave
show tables; show tables;
connection master; connection master;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set @@debug_dbug="d,simulate_register_view_failure"; set @@debug_dbug="d,simulate_register_view_failure";
--error ER_OUT_OF_RESOURCES --error ER_OUT_OF_RESOURCES
...@@ -31,5 +31,5 @@ show tables; ...@@ -31,5 +31,5 @@ show tables;
connection master; connection master;
DROP VIEW IF EXISTS v1; DROP VIEW IF EXISTS v1;
DROP TABLE t1; DROP TABLE t1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
--source include/rpl_end.inc --source include/rpl_end.inc
SET @old_debug = @@GLOBAL.debug; SET @old_debug = @@GLOBAL.debug;
set debug_dbug= 'T'; SET debug_dbug= 'T';
select @@debug; select @@debug;
@@debug @@debug
T T
set debug_dbug= '+P'; SET debug_dbug= '+P';
select @@debug; select @@debug;
@@debug @@debug
P:T P:T
set debug_dbug= '-P'; SET debug_dbug= '-P';
select @@debug; select @@debug;
@@debug @@debug
T T
......
...@@ -6,11 +6,11 @@ SET @old_debug = @@GLOBAL.debug; ...@@ -6,11 +6,11 @@ SET @old_debug = @@GLOBAL.debug;
# Bug#34678 @@debug variable's incremental mode # Bug#34678 @@debug variable's incremental mode
# #
set debug_dbug= 'T'; SET debug_dbug= 'T';
select @@debug; select @@debug;
set debug_dbug= '+P'; SET debug_dbug= '+P';
select @@debug; select @@debug;
set debug_dbug= '-P'; SET debug_dbug= '-P';
select @@debug; select @@debug;
# #
......
...@@ -19,9 +19,9 @@ SET @old_debug= @@session.debug; ...@@ -19,9 +19,9 @@ SET @old_debug= @@session.debug;
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB; CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB;
CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam; CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam;
set debug_dbug='+d,send_kill_after_delete'; SET debug_dbug='+d,send_kill_after_delete';
CREATE OR REPLACE TABLE t1 LIKE tmp; CREATE OR REPLACE TABLE t1 LIKE tmp;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
SHOW TABLES; SHOW TABLES;
show create table t1; show create table t1;
--sync_slave_with_master --sync_slave_with_master
......
...@@ -8,7 +8,7 @@ if (!$HA_ARCHIVE_SO) { ...@@ -8,7 +8,7 @@ if (!$HA_ARCHIVE_SO) {
let $mysqld_datadir= `select @@datadir`; let $mysqld_datadir= `select @@datadir`;
SET @saved_dbug = @@debug_dbug; SET @saved_dbug = @@debug_dbug;
set debug_dbug='+d,unstable_db_type'; SET debug_dbug='+d,unstable_db_type';
install soname 'ha_archive'; install soname 'ha_archive';
create table t1 (a int) engine=archive; create table t1 (a int) engine=archive;
...@@ -28,4 +28,4 @@ drop table t1; ...@@ -28,4 +28,4 @@ drop table t1;
--list_files $mysqld_datadir/test --list_files $mysqld_datadir/test
uninstall soname 'ha_archive'; uninstall soname 'ha_archive';
set debug_dbug=@saved_dbug; SET debug_dbug=@saved_dbug;
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
--source include/have_debug.inc --source include/have_debug.inc
create table t1 (a int, b int); create table t1 (a int, b int);
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set debug_dbug='+d,external_lock_failure'; SET debug_dbug='+d,external_lock_failure';
--error ER_GET_ERRMSG --error ER_GET_ERRMSG
alter table t1 add column c int; alter table t1 add column c int;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
drop table t1; drop table t1;
...@@ -21,7 +21,7 @@ set tmp_table_size=1024; ...@@ -21,7 +21,7 @@ set tmp_table_size=1024;
# Set debug flag so an error is returned when # Set debug flag so an error is returned when
# tmp table in query is converted from heap to myisam # tmp table in query is converted from heap to myisam
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,raise_error"; set session debug_dbug="+d,raise_error";
--error ER_DUP_KEY --error ER_DUP_KEY
...@@ -37,7 +37,7 @@ CREATE TABLE t1 (a INT(100) NOT NULL); ...@@ -37,7 +37,7 @@ CREATE TABLE t1 (a INT(100) NOT NULL);
INSERT INTO t1 VALUES (1), (0), (2); INSERT INTO t1 VALUES (1), (0), (2);
SET SESSION debug_dbug='+d,alter_table_only_index_change'; SET SESSION debug_dbug='+d,alter_table_only_index_change';
ALTER TABLE t1 ADD INDEX a(a); ALTER TABLE t1 ADD INDEX a(a);
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;
...@@ -52,7 +52,7 @@ SET SESSION debug_dbug="+d,bug42064_simulate_oom"; ...@@ -52,7 +52,7 @@ SET SESSION debug_dbug="+d,bug42064_simulate_oom";
# May fail with either ER_OUT_OF_RESOURCES or EE_OUTOFMEMORY # May fail with either ER_OUT_OF_RESOURCES or EE_OUTOFMEMORY
--error ER_OUT_OF_RESOURCES, 5 --error ER_OUT_OF_RESOURCES, 5
INSERT INTO t1 VALUES(""); INSERT INTO t1 VALUES("");
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
DROP TABLE t1; DROP TABLE t1;
...@@ -85,7 +85,7 @@ EXPLAIN ...@@ -85,7 +85,7 @@ EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
SET optimizer_switch=@save_optimizer_switch; SET optimizer_switch=@save_optimizer_switch;
...@@ -102,7 +102,7 @@ INSERT INTO t2 VALUES (1),(2); ...@@ -102,7 +102,7 @@ INSERT INTO t2 VALUES (1),(2);
SET SESSION debug_dbug="+d,bug11747970_raise_error"; SET SESSION debug_dbug="+d,bug11747970_raise_error";
--error ER_QUERY_INTERRUPTED --error ER_QUERY_INTERRUPTED
INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1); INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1);
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
DROP TABLE t1,t2; DROP TABLE t1,t2;
...@@ -157,4 +157,4 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory"; ...@@ -157,4 +157,4 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory";
--error ER_OUT_OF_RESOURCES, 5 --error ER_OUT_OF_RESOURCES, 5
SELECT f1(1); SELECT f1(1);
DROP FUNCTION f1; DROP FUNCTION f1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MDEV-6830 Server crashes in best_access_path after a sequence of SELECTs invollving a temptable view # MDEV-6830 Server crashes in best_access_path after a sequence of SELECTs invollving a temptable view
# #
--source include/have_debug.inc --source include/have_debug.inc
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set @@debug_dbug= 'd,opt'; set @@debug_dbug= 'd,opt';
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM;
...@@ -60,4 +60,4 @@ SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5; ...@@ -60,4 +60,4 @@ SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5;
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
drop view v2,v3; drop view v2,v3;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -66,7 +66,7 @@ create table t1 (a int, index(a)); ...@@ -66,7 +66,7 @@ create table t1 (a int, index(a));
lock tables t1 write; lock tables t1 write;
insert t1 values (1),(2),(1); insert t1 values (1),(2),(1);
set @old_dbug=@@debug_dbug; set @old_dbug=@@debug_dbug;
set debug_dbug='+d,mi_lock_database_failure'; SET debug_dbug='+d,mi_lock_database_failure';
unlock tables; unlock tables;
set debug_dbug=@old_dbug; SET debug_dbug=@old_dbug;
drop table t1; drop table t1;
...@@ -80,11 +80,11 @@ create table t1 ( ...@@ -80,11 +80,11 @@ create table t1 (
insert into t1 insert into t1
select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a
from t0 A, t0 B, t0 C, t0 D where D.a<5; from t0 A, t0 B, t0 C, t0 D where D.a<5;
set @saved_dbug = @@global.debug_dbug; SET @saved_dbug = @@GLOBAL.debug_dbug;
set @@global.debug_dbug="+d,ha_index_init_fail"; set @@global.debug_dbug="+d,ha_index_init_fail";
explain select * from t1 where a=10 and b=10; explain select * from t1 where a=10 and b=10;
--error ER_TABLE_DEF_CHANGED --error ER_TABLE_DEF_CHANGED
select * from t1 where a=10 and b=10; select * from t1 where a=10 and b=10;
DROP TABLE t0,t1; DROP TABLE t0,t1;
set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.debug_dbug = @saved_dbug;
set @@optimizer_switch= @optimizer_switch_save; set @@optimizer_switch= @optimizer_switch_save;
...@@ -14,14 +14,14 @@ INSERT INTO t1 (c) SELECT c FROM t1; ...@@ -14,14 +14,14 @@ INSERT INTO t1 (c) SELECT c FROM t1;
INSERT INTO t1 (c) SELECT c FROM t1; INSERT INTO t1 (c) SELECT c FROM t1;
set @old_dbug=@@session.debug_dbug; set @old_dbug=@@session.debug_dbug;
set debug_dbug="+d,kill_join_init_read_record"; SET debug_dbug="+d,kill_join_init_read_record";
--error ER_QUERY_INTERRUPTED --error ER_QUERY_INTERRUPTED
SELECT 1 FROM t1 AS alias1, t1 AS alias2, t1 AS alias3 SELECT 1 FROM t1 AS alias1, t1 AS alias2, t1 AS alias3
WHERE alias1.c = alias2.c OR alias1.i <= 1 WHERE alias1.c = alias2.c OR alias1.i <= 1
; ;
set debug_dbug=@old_dbug; SET debug_dbug=@old_dbug;
DROP TABLE t1; DROP TABLE t1;
...@@ -10,7 +10,7 @@ create table t2 (a int); ...@@ -10,7 +10,7 @@ create table t2 (a int);
insert into t2 values (2), (3); insert into t2 values (2), (3);
set session join_cache_level=3; set session join_cache_level=3;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set @@debug_dbug= 'd,opt'; set @@debug_dbug= 'd,opt';
explain select t1.b from t1,t2 where t1.b=t2.a; explain select t1.b from t1,t2 where t1.b=t2.a;
...@@ -18,4 +18,4 @@ select t1.b from t1,t2 where t1.b=t2.a; ...@@ -18,4 +18,4 @@ select t1.b from t1,t2 where t1.b=t2.a;
set session join_cache_level=default; set session join_cache_level=default;
drop table t1,t2; drop table t1,t2;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
...@@ -15,7 +15,7 @@ SET @old_debug= @@session.debug; ...@@ -15,7 +15,7 @@ SET @old_debug= @@session.debug;
# is that we use the following commands for synchronization: # is that we use the following commands for synchronization:
# #
# set @show_explain_probe_select_id=1; # set @show_explain_probe_select_id=1;
# set debug_dbug='d,show_explain_probe_join_exec_start'; # SET debug_dbug='d,show_explain_probe_join_exec_start';
# send select count(*) from t1 where a < 100000; # send select count(*) from t1 where a < 100000;
# #
# When ran with mysqltest_embedded, this translates into: # When ran with mysqltest_embedded, this translates into:
...@@ -75,7 +75,7 @@ let $wait_condition= select State='show_explain_trap' from information_schema.pr ...@@ -75,7 +75,7 @@ let $wait_condition= select State='show_explain_trap' from information_schema.pr
# #
connection con1; connection con1;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send select count(*) from t1 where a < 100000; send select count(*) from t1 where a < 100000;
connection default; connection default;
...@@ -103,109 +103,109 @@ evalp show explain for $thr2; ...@@ -103,109 +103,109 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set optimizer_switch= @show_expl_tmp; set optimizer_switch= @show_expl_tmp;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # UNION, first branch --echo # UNION, first branch
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send explain select a from t0 A union select a+1 from t0 B; send explain select a from t0 A union select a+1 from t0 B;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # UNION, second branch --echo # UNION, second branch
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send explain select a from t0 A union select a+1 from t0 B; send explain select a from t0 A union select a+1 from t0 B;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # Uncorrelated subquery, select --echo # Uncorrelated subquery, select
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send select a, (select max(a) from t0 B) from t0 A where a<1; send select a, (select max(a) from t0 B) from t0 A where a<1;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # Uncorrelated subquery, explain --echo # Uncorrelated subquery, explain
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send explain select a, (select max(a) from t0 B) from t0 A where a<1; send explain select a, (select max(a) from t0 B) from t0 A where a<1;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # correlated subquery, select --echo # correlated subquery, select
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # correlated subquery, explain --echo # correlated subquery, explain
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # correlated subquery, select, while inside the subquery --echo # correlated subquery, select, while inside the subquery
set @show_explain_probe_select_id=2; # <--- set @show_explain_probe_select_id=2; # <---
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # correlated subquery, explain, while inside the subquery --echo # correlated subquery, explain, while inside the subquery
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # correlated subquery, explain, while inside the subquery --echo # correlated subquery, explain, while inside the subquery
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
# TODO: explain in the parent subuqery when the un-correlated child has been # TODO: explain in the parent subuqery when the un-correlated child has been
# run (and have done irreversible cleanups) # run (and have done irreversible cleanups)
...@@ -218,7 +218,7 @@ set debug_dbug=@old_debug; ...@@ -218,7 +218,7 @@ set debug_dbug=@old_debug;
--echo # I've found experimentally that select_id==2 here... --echo # I've found experimentally that select_id==2 here...
--echo # --echo #
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send set @foo= (select max(a) from t0 where sin(a) >0); send set @foo= (select max(a) from t0 where sin(a) >0);
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
...@@ -228,14 +228,14 @@ evalp kill query $thr2; ...@@ -228,14 +228,14 @@ evalp kill query $thr2;
connection con1; connection con1;
--error ER_QUERY_INTERRUPTED --error ER_QUERY_INTERRUPTED
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # --echo #
--echo # Attempt SHOW EXPLAIN for an UPDATE --echo # Attempt SHOW EXPLAIN for an UPDATE
--echo # --echo #
create table t2 as select a as a, a as dummy from t0 limit 2; create table t2 as select a as a, a as dummy from t0 limit 2;
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 ; send update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 ;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
...@@ -247,14 +247,14 @@ evalp show explain for $thr2; ...@@ -247,14 +247,14 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
drop table t2; drop table t2;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # --echo #
--echo # Attempt SHOW EXPLAIN for a DELETE (UPD: now works) --echo # Attempt SHOW EXPLAIN for a DELETE (UPD: now works)
--echo # --echo #
create table t2 as select a as a, a as dummy from t0 limit 2; create table t2 as select a as a, a as dummy from t0 limit 2;
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 ; send delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 ;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
...@@ -266,14 +266,14 @@ evalp show explain for $thr2; ...@@ -266,14 +266,14 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
drop table t2; drop table t2;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # --echo #
--echo # Multiple SHOW EXPLAIN calls for one select --echo # Multiple SHOW EXPLAIN calls for one select
--echo # --echo #
create table t2 as select a as a, a as dummy from t0 limit 3; create table t2 as select a as a, a as dummy from t0 limit 3;
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send select t2.a, ((select max(a) from t0 where t2.a + t0.a <3) >3) as SUBQ from t2; send select t2.a, ((select max(a) from t0 where t2.a + t0.a <3) >3) as SUBQ from t2;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
...@@ -285,14 +285,14 @@ evalp show explain for $thr2; ...@@ -285,14 +285,14 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
drop table t2; drop table t2;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # --echo #
--echo # SHOW EXPLAIN for SELECT ... ORDER BY with "Using filesort" --echo # SHOW EXPLAIN for SELECT ... ORDER BY with "Using filesort"
--echo # --echo #
explain select * from t0 order by a; explain select * from t0 order by a;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
send select * from t0 order by a; send select * from t0 order by a;
connection default; connection default;
...@@ -300,7 +300,7 @@ connection default; ...@@ -300,7 +300,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # --echo #
--echo # SHOW EXPLAIN for SELECT ... with "Using temporary" --echo # SHOW EXPLAIN for SELECT ... with "Using temporary"
...@@ -309,7 +309,7 @@ connection default; ...@@ -309,7 +309,7 @@ connection default;
explain select distinct a from t0; explain select distinct a from t0;
connection con1; connection con1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
send select distinct a from t0; send select distinct a from t0;
connection default; connection default;
...@@ -317,7 +317,7 @@ connection default; ...@@ -317,7 +317,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # --echo #
--echo # SHOW EXPLAIN for SELECT ... with "Using temporary; Using filesort" --echo # SHOW EXPLAIN for SELECT ... with "Using temporary; Using filesort"
...@@ -326,7 +326,7 @@ connection default; ...@@ -326,7 +326,7 @@ connection default;
explain select distinct a from t0; explain select distinct a from t0;
connection con1; connection con1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
send select distinct a from t0; send select distinct a from t0;
connection default; connection default;
...@@ -334,7 +334,7 @@ connection default; ...@@ -334,7 +334,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # --echo #
--echo # MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY --echo # MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY
...@@ -343,7 +343,7 @@ CREATE TABLE t2 ( a INT ); ...@@ -343,7 +343,7 @@ CREATE TABLE t2 ( a INT );
INSERT INTO t2 VALUES (1),(2),(1),(4),(2); INSERT INTO t2 VALUES (1),(2),(1),(4),(2);
explain SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; explain SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a;
set debug_dbug='+d,show_explain_in_find_all_keys'; SET debug_dbug='+d,show_explain_in_find_all_keys';
send SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; send SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a;
connection default; connection default;
...@@ -354,7 +354,7 @@ connection default; ...@@ -354,7 +354,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t2; DROP TABLE t2;
...@@ -370,7 +370,7 @@ INSERT INTO t2 VALUES (1),(2),(1),(4),(2); ...@@ -370,7 +370,7 @@ INSERT INTO t2 VALUES (1),(2),(1),(4),(2);
EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
send EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; send EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ;
connection default; connection default;
...@@ -378,7 +378,7 @@ connection default; ...@@ -378,7 +378,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t2; DROP TABLE t2;
...@@ -394,7 +394,7 @@ INSERT INTO t2 VALUES (4),(5),(6),(7),(8),(9); ...@@ -394,7 +394,7 @@ INSERT INTO t2 VALUES (4),(5),(6),(7),(8),(9);
explain SELECT * FROM v1, t2; explain SELECT * FROM v1, t2;
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
send SELECT * FROM v1, t2; send SELECT * FROM v1, t2;
connection default; connection default;
...@@ -405,7 +405,7 @@ evalp kill query $thr2; ...@@ -405,7 +405,7 @@ evalp kill query $thr2;
connection con1; connection con1;
--error ER_QUERY_INTERRUPTED --error ER_QUERY_INTERRUPTED
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t2, t3; DROP TABLE t2, t3;
...@@ -413,21 +413,21 @@ DROP TABLE t2, t3; ...@@ -413,21 +413,21 @@ DROP TABLE t2, t3;
--echo # MDEV-267: SHOW EXPLAIN: Server crashes in JOIN::print_explain on most of queries --echo # MDEV-267: SHOW EXPLAIN: Server crashes in JOIN::print_explain on most of queries
--echo # --echo #
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
send select sleep(1); send select sleep(1);
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # --echo #
--echo # Same as above, but try another reason for JOIN to be degenerate --echo # Same as above, but try another reason for JOIN to be degenerate
--echo # --echo #
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
send select * from t0 where 1>10; send select * from t0 where 1>10;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
...@@ -435,7 +435,7 @@ connection default; ...@@ -435,7 +435,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # --echo #
--echo # Same as above, but try another reason for JOIN to be degenerate (2) --echo # Same as above, but try another reason for JOIN to be degenerate (2)
...@@ -443,7 +443,7 @@ set debug_dbug=@old_debug; ...@@ -443,7 +443,7 @@ set debug_dbug=@old_debug;
create table t3(a int primary key); create table t3(a int primary key);
insert into t3 select a from t0; insert into t3 select a from t0;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
send select * from t0,t3 where t3.a=112233; send select * from t0,t3 where t3.a=112233;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
...@@ -451,7 +451,7 @@ connection default; ...@@ -451,7 +451,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t3; drop table t3;
--echo # --echo #
...@@ -470,7 +470,7 @@ explain SELECT * FROM t2 WHERE a = ...@@ -470,7 +470,7 @@ explain SELECT * FROM t2 WHERE a =
); );
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; SET debug_dbug='+d,show_explain_probe_do_select';
send SELECT * FROM t2 WHERE a = send SELECT * FROM t2 WHERE a =
(SELECT MAX(a) FROM t2 (SELECT MAX(a) FROM t2
WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3) WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3)
...@@ -480,7 +480,7 @@ connection default; ...@@ -480,7 +480,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t2; drop table t2;
...@@ -513,7 +513,7 @@ WHERE a1 < ALL ( ...@@ -513,7 +513,7 @@ WHERE a1 < ALL (
); );
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; SET debug_dbug='+d,show_explain_probe_do_select';
send send
SELECT count(*) FROM t2, t3 SELECT count(*) FROM t2, t3
WHERE a1 < ALL ( WHERE a1 < ALL (
...@@ -526,7 +526,7 @@ connection default; ...@@ -526,7 +526,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t2, t3, t4; drop table t2, t3, t4;
--echo # --echo #
...@@ -538,7 +538,7 @@ INSERT INTO t2 VALUES ...@@ -538,7 +538,7 @@ INSERT INTO t2 VALUES
(11,23),(12,3),(13,45),(14,16),(15,2),(16,33),(17,2),(18,5),(19,9),(20,2); (11,23),(12,3),(13,45),(14,16),(15,2),(16,33),(17,2),(18,5),(19,9),(20,2);
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_end'; SET debug_dbug='+d,show_explain_probe_join_exec_end';
send send
SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`); SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`);
connection default; connection default;
...@@ -547,7 +547,7 @@ connection default; ...@@ -547,7 +547,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t1; DROP TABLE t1;
...@@ -559,7 +559,7 @@ CREATE TABLE t1(a INT, KEY(a)); ...@@ -559,7 +559,7 @@ CREATE TABLE t1(a INT, KEY(a));
INSERT INTO t1 VALUES (3),(1),(5),(1); INSERT INTO t1 VALUES (3),(1),(5),(1);
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send SELECT 'test' FROM t1 WHERE a=1; send SELECT 'test' FROM t1 WHERE a=1;
connection default; connection default;
...@@ -567,7 +567,7 @@ connection default; ...@@ -567,7 +567,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1; DROP TABLE t1;
...@@ -591,7 +591,7 @@ set join_cache_level=0; ...@@ -591,7 +591,7 @@ set join_cache_level=0;
explain select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100; explain select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_test_if_quick_select'; SET debug_dbug='+d,show_explain_probe_test_if_quick_select';
send send
select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100; select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100;
...@@ -608,7 +608,7 @@ evalp show explain for $thr2; ...@@ -608,7 +608,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t1; drop table t1;
--echo # --echo #
...@@ -619,7 +619,7 @@ CREATE TABLE t1(a INT, b INT, c INT, KEY(a), KEY(b), KEY(c)); ...@@ -619,7 +619,7 @@ CREATE TABLE t1(a INT, b INT, c INT, KEY(a), KEY(b), KEY(c));
INSERT INTO t1 (a) VALUES (3),(1),(5),(1); INSERT INTO t1 (a) VALUES (3),(1),(5),(1);
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send SHOW INDEX FROM t1; send SHOW INDEX FROM t1;
connection default; connection default;
...@@ -627,7 +627,7 @@ connection default; ...@@ -627,7 +627,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1; DROP TABLE t1;
...@@ -641,7 +641,7 @@ CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; ...@@ -641,7 +641,7 @@ CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
EXPLAIN SELECT a + 1 FROM v1; EXPLAIN SELECT a + 1 FROM v1;
set debug_dbug='+d,show_explain_probe_join_tab_preread'; SET debug_dbug='+d,show_explain_probe_join_tab_preread';
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
send send
...@@ -651,7 +651,7 @@ connection default; ...@@ -651,7 +651,7 @@ connection default;
evalp show explain for $thr2; evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
...@@ -667,7 +667,7 @@ INSERT INTO t1 VALUES (4),(6); ...@@ -667,7 +667,7 @@ INSERT INTO t1 VALUES (4),(6);
EXPLAIN EXPLAIN
SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ); SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 );
set debug_dbug='+d,show_explain_probe_union_read'; SET debug_dbug='+d,show_explain_probe_union_read';
send send
SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ); SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 );
...@@ -681,7 +681,7 @@ evalp show explain for $thr2; ...@@ -681,7 +681,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1; DROP TABLE t1;
--echo # --echo #
...@@ -703,7 +703,7 @@ SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias ...@@ -703,7 +703,7 @@ SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias
WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ); WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b );
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
--send --send
SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias
WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ); WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b );
...@@ -714,7 +714,7 @@ evalp show explain for $thr2; ...@@ -714,7 +714,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1, t2; DROP TABLE t1, t2;
--echo # --echo #
...@@ -737,7 +737,7 @@ insert into t3 select * from t4; ...@@ -737,7 +737,7 @@ insert into t3 select * from t4;
explain select distinct t1.a from t1,t3 where t1.a=t3.a; explain select distinct t1.a from t1,t3 where t1.a=t3.a;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
--send --send
select distinct t1.a from t1,t3 where t1.a=t3.a; select distinct t1.a from t1,t3 where t1.a=t3.a;
connection default; connection default;
...@@ -746,7 +746,7 @@ evalp show explain for $thr2; ...@@ -746,7 +746,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t1,t3,t4; drop table t1,t3,t4;
...@@ -756,7 +756,7 @@ drop table t1,t3,t4; ...@@ -756,7 +756,7 @@ drop table t1,t3,t4;
create user test2@localhost; create user test2@localhost;
grant ALL on test.* to test2@localhost; grant ALL on test.* to test2@localhost;
# Give the user SUPER privilege so it can set debug_dbug variable. # Give the user SUPER privilege so it can SET debug_dbug variable.
grant super on *.* to test2@localhost; grant super on *.* to test2@localhost;
connect (con2, localhost, test2,,); connect (con2, localhost, test2,,);
connection con1; connection con1;
...@@ -765,7 +765,7 @@ connection con1; ...@@ -765,7 +765,7 @@ connection con1;
--echo # First, make sure that user 'test2' cannot do SHOW EXPLAIN on us --echo # First, make sure that user 'test2' cannot do SHOW EXPLAIN on us
--echo # --echo #
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send send
select * from t0 where a < 3; select * from t0 where a < 3;
...@@ -781,7 +781,7 @@ evalp show explain for $thr2; ...@@ -781,7 +781,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
--echo # --echo #
--echo # Check that user test2 can do SHOW EXPLAIN on its own queries --echo # Check that user test2 can do SHOW EXPLAIN on its own queries
...@@ -791,7 +791,7 @@ connect (con3, localhost, test2,,); ...@@ -791,7 +791,7 @@ connect (con3, localhost, test2,,);
connection con2; connection con2;
let $thr_con2=`select connection_id()`; let $thr_con2=`select connection_id()`;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send send
select * from t0 where a < 3; select * from t0 where a < 3;
...@@ -817,10 +817,10 @@ disconnect con2; ...@@ -817,10 +817,10 @@ disconnect con2;
grant process on *.* to test2@localhost; grant process on *.* to test2@localhost;
connect (con2, localhost, test2,,); connect (con2, localhost, test2,,);
connection con1; connection con1;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send send
select * from t0 where a < 3; select * from t0 where a < 3;
...@@ -832,7 +832,7 @@ evalp show explain for $thr2; ...@@ -832,7 +832,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
revoke all privileges on test.* from test2@localhost; revoke all privileges on test.* from test2@localhost;
drop user test2@localhost; drop user test2@localhost;
...@@ -912,7 +912,7 @@ WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 ...@@ -912,7 +912,7 @@ WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129
ORDER BY b; ORDER BY b;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
--send --send
SELECT a+SLEEP(0.01) FROM t1 SELECT a+SLEEP(0.01) FROM t1
WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129
...@@ -924,10 +924,10 @@ evalp show explain for $thr2; ...@@ -924,10 +924,10 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; SET debug_dbug='+d,show_explain_probe_do_select';
--send --send
SELECT a+SLEEP(0.01) FROM t1 SELECT a+SLEEP(0.01) FROM t1
WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129
...@@ -940,7 +940,7 @@ evalp show explain for $thr2; ...@@ -940,7 +940,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t1; drop table t1;
...@@ -956,7 +956,7 @@ INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12, t1 t13; ...@@ -956,7 +956,7 @@ INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12, t1 t13;
EXPLAIN SELECT a FROM t1 GROUP BY a; EXPLAIN SELECT a FROM t1 GROUP BY a;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
--send --send
SELECT a FROM t1 GROUP BY a; SELECT a FROM t1 GROUP BY a;
...@@ -967,7 +967,7 @@ evalp show explain for $thr2; ...@@ -967,7 +967,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t1; drop table t1;
...@@ -983,7 +983,7 @@ INSERT INTO t2 VALUES (86,'English'),(87,'Russian'); ...@@ -983,7 +983,7 @@ INSERT INTO t2 VALUES (86,'English'),(87,'Russian');
explain SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's'; explain SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's';
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
--send --send
SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's'; SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's';
...@@ -994,7 +994,7 @@ evalp show explain for $thr2; ...@@ -994,7 +994,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
drop table t1, t2; drop table t1, t2;
--echo # --echo #
...@@ -1033,7 +1033,7 @@ explain ...@@ -1033,7 +1033,7 @@ explain
SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2; SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; SET debug_dbug='+d,show_explain_probe_do_select';
send send
SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2; SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2;
...@@ -1045,7 +1045,7 @@ evalp show explain for $thr2; ...@@ -1045,7 +1045,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
...@@ -1069,7 +1069,7 @@ SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias ...@@ -1069,7 +1069,7 @@ SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias
WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10; WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send send
SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias
...@@ -1082,7 +1082,7 @@ evalp show explain for $thr2; ...@@ -1082,7 +1082,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
--echo # --echo #
...@@ -1109,7 +1109,7 @@ select charset(' ...@@ -1109,7 +1109,7 @@ select charset('
select hex(''); select hex('');
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send send
select * from t0 where length('') = a; select * from t0 where length('') = a;
...@@ -1124,7 +1124,7 @@ connection con1; ...@@ -1124,7 +1124,7 @@ connection con1;
# The constant should be two letters, the last looking like 'bl' # The constant should be two letters, the last looking like 'bl'
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
set names default; set names default;
--echo # --echo #
...@@ -1151,7 +1151,7 @@ WHERE b <= ANY ( ...@@ -1151,7 +1151,7 @@ WHERE b <= ANY (
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_join_exec_start'; SET debug_dbug='+d,show_explain_probe_join_exec_start';
send send
SELECT SUM(b) FROM ( SELECT * FROM t1 ) AS alias1, t2 SELECT SUM(b) FROM ( SELECT * FROM t1 ) AS alias1, t2
...@@ -1166,7 +1166,7 @@ evalp show explain for $thr2; ...@@ -1166,7 +1166,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
DROP TABLE t1,t2; DROP TABLE t1,t2;
drop table t0; drop table t0;
...@@ -1182,7 +1182,7 @@ insert into t1 select a,a from t0; ...@@ -1182,7 +1182,7 @@ insert into t1 select a,a from t0;
create table t2 as select * from t1; create table t2 as select * from t1;
set @show_explain_probe_select_id=2; set @show_explain_probe_select_id=2;
set debug_dbug='+d,show_explain_probe_best_ext_lim_search'; SET debug_dbug='+d,show_explain_probe_best_ext_lim_search';
send send
explain explain
select * from t0 select * from t0
......
...@@ -38,7 +38,7 @@ let $wait_condition= select State='show_explain_trap' from information_schema.pr ...@@ -38,7 +38,7 @@ let $wait_condition= select State='show_explain_trap' from information_schema.pr
--echo # Test SHOW EXPLAIN for single-table DELETE --echo # Test SHOW EXPLAIN for single-table DELETE
--echo # --echo #
connection con2; connection con2;
set debug_dbug='+d,show_explain_probe_delete_exec_start'; SET debug_dbug='+d,show_explain_probe_delete_exec_start';
send delete from t1 where a<10 and b+1>1000; send delete from t1 where a<10 and b+1>1000;
connection default; connection default;
...@@ -51,7 +51,7 @@ reap; ...@@ -51,7 +51,7 @@ reap;
--echo # Test SHOW EXPLAIN for multi-table DELETE --echo # Test SHOW EXPLAIN for multi-table DELETE
--echo # --echo #
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set debug_dbug='+d,show_explain_probe_do_select'; SET debug_dbug='+d,show_explain_probe_do_select';
send delete t1 from t1, t0 where t0.a=t1.a and t1.b +1 > 1000; send delete t1 from t1, t0 where t0.a=t1.a and t1.b +1 > 1000;
connection default; connection default;
--source include/wait_condition.inc --source include/wait_condition.inc
...@@ -63,7 +63,7 @@ reap; ...@@ -63,7 +63,7 @@ reap;
--echo # Test SHOW EXPLAIN for single-table UPDATE --echo # Test SHOW EXPLAIN for single-table UPDATE
--echo # --echo #
connection con2; connection con2;
set debug_dbug='+d,show_explain_probe_update_exec_start'; SET debug_dbug='+d,show_explain_probe_update_exec_start';
send update t1 set filler='filler-data-2' where a<10 and b+1>1000; send update t1 set filler='filler-data-2' where a<10 and b+1>1000;
connection default; connection default;
...@@ -74,5 +74,5 @@ reap; ...@@ -74,5 +74,5 @@ reap;
drop table t0,t1; drop table t0,t1;
set debug_dbug=@old_debug; SET debug_dbug=@old_debug;
set debug_sync='RESET'; set debug_sync='RESET';
...@@ -38,8 +38,8 @@ let $wait_condition= select State='show_explain_trap' from information_schema.pr ...@@ -38,8 +38,8 @@ let $wait_condition= select State='show_explain_trap' from information_schema.pr
# #
connection con1; connection con1;
set @show_explain_probe_select_id=1; set @show_explain_probe_select_id=1;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set debug_dbug='d,show_explain_probe_join_exec_start'; SET debug_dbug='d,show_explain_probe_join_exec_start';
send select count(*) from t0 where a < 100000; send select count(*) from t0 where a < 100000;
connection default; connection default;
...@@ -48,7 +48,7 @@ evalp show explain for $thr2; ...@@ -48,7 +48,7 @@ evalp show explain for $thr2;
connection con1; connection con1;
reap; reap;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
evalp select event_name evalp select event_name
from from
......
...@@ -9,8 +9,8 @@ create table t1 (a int, b int) engine=memory; ...@@ -9,8 +9,8 @@ create table t1 (a int, b int) engine=memory;
insert t1 select seq, seq+1 from seq_1_to_1000; insert t1 select seq, seq+1 from seq_1_to_1000;
set global general_log=0; set global general_log=0;
set global log_queries_not_using_indexes=1; set global log_queries_not_using_indexes=1;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set debug_dbug='+d,simulate_file_write_error'; SET debug_dbug='+d,simulate_file_write_error';
--disable_result_log --disable_result_log
--let $run= 50 --let $run= 50
while ($run) while ($run)
...@@ -19,7 +19,7 @@ while ($run) ...@@ -19,7 +19,7 @@ while ($run)
dec $run; dec $run;
} }
--enable_result_log --enable_result_log
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
set global general_log=1; set global general_log=1;
set global log_queries_not_using_indexes=default; set global log_queries_not_using_indexes=default;
drop table t1; drop table t1;
...@@ -16,10 +16,10 @@ while ($i) { ...@@ -16,10 +16,10 @@ while ($i) {
} }
--enable_query_log --enable_query_log
set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3; set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3;
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set debug_dbug='+d,simulate_file_write_error'; SET debug_dbug='+d,simulate_file_write_error';
set @@max_heap_table_size=128*1024; set @@max_heap_table_size=128*1024;
--replace_regex /'.*'/'tmp-file'/ --replace_regex /'.*'/'tmp-file'/
analyze table t1; analyze table t1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
drop table t1; drop table t1;
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
# #
--source include/have_debug.inc --source include/have_debug.inc
create table t1 (i tinyint); create table t1 (i tinyint);
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
set debug_dbug='+d,bug11747970_raise_error'; SET debug_dbug='+d,bug11747970_raise_error';
--error ER_QUERY_INTERRUPTED --error ER_QUERY_INTERRUPTED
insert into t1 (i) select i from t1 union select i from t1; insert into t1 (i) select i from t1 union select i from t1;
drop table t1; drop table t1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ create table t1 (a int primary key) engine=innodb; ...@@ -9,7 +9,7 @@ create table t1 (a int primary key) engine=innodb;
# Test that warnings produced during autocommit (after calling # Test that warnings produced during autocommit (after calling
# set_ok_status()) are still reported to the client. # set_ok_status()) are still reported to the client.
set @saved_dbug = @@session.debug_dbug; SET @saved_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,warn_during_ha_commit_trans"; SET SESSION debug_dbug="+d,warn_during_ha_commit_trans";
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
# The warning will be shown automatically by mysqltest; there was a bug where # The warning will be shown automatically by mysqltest; there was a bug where
...@@ -18,4 +18,4 @@ INSERT INTO t1 VALUES (1); ...@@ -18,4 +18,4 @@ INSERT INTO t1 VALUES (1);
SHOW WARNINGS; SHOW WARNINGS;
drop table t1; drop table t1;
set debug_dbug= @saved_dbug; SET debug_dbug= @saved_dbug;
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