Skip to content

Commit

Permalink
Merge branch '10.2' into 10.3
Browse files Browse the repository at this point in the history
# Conflicts:
#	mysql-test/suite/galera/r/MW-388.result
#	mysql-test/suite/galera/t/MW-388.test
#	mysql-test/suite/innodb/r/truncate_inject.result
#	mysql-test/suite/innodb/t/truncate_inject.test
#	mysql-test/suite/rpl/r/rpl_stop_slave.result
#	mysql-test/suite/rpl/t/rpl_stop_slave.test
#	sql/sp_head.cc
#	sql/sp_head.h
#	sql/sql_lex.cc
#	sql/sql_yacc.yy
#	storage/xtradb/buf/buf0dblwr.cc
  • Loading branch information
spetrunia committed Jan 16, 2020
2 parents d531b4e + b044294 commit e709eb9
Show file tree
Hide file tree
Showing 219 changed files with 841 additions and 524 deletions.
4 changes: 2 additions & 2 deletions mysql-test/include/binlog_inject_error.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# let query= 'CREATE TABLE t1 (a INT)';
# source include/binlog_inject_error.inc;
#

set @saved_dbug = @@global.debug_dbug;
SET GLOBAL debug_dbug='d,injecting_fault_writing';
--echo $query;
--replace_regex /(errno: .*)/(errno: #)/
--error ER_ERROR_ON_WRITE
--eval $query
SET GLOBAL debug_dbug='';
set @@global.debug_dbug = @saved_dbug;
3 changes: 1 addition & 2 deletions mysql-test/main/cache_temporal_4265.result
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
create table t1 (a date);
insert t1 values ('2000-01-02'), ('2001-02-03'), ('2002-03-04');
set debug_dbug='d,str_to_datetime_warn';
SET STATEMENT debug_dbug='d,str_to_datetime_warn' for
select * from t1 where a > date_add('2000-01-01', interval 5 day);
a
2001-02-03
2002-03-04
Warnings:
Note 1003 2000-01-01
set debug_dbug='';
drop table t1;
create table t1 (id int not null, ut timestamp(6) not null);
insert into t1 values(1, '2001-01-01 00:00:00.2');
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/main/cache_temporal_4265.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

create table t1 (a date);
insert t1 values ('2000-01-02'), ('2001-02-03'), ('2002-03-04');
set debug_dbug='d,str_to_datetime_warn';
select * from t1 where a > date_add('2000-01-01', interval 5 day);
set debug_dbug='';

SET STATEMENT debug_dbug='d,str_to_datetime_warn' for
select * from t1 where a > date_add('2000-01-01', interval 5 day);
drop table t1;

#
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/main/create_or_replace2.result
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ drop table if exists t1;
SET @old_debug= @@session.debug;
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB;
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;
set debug_dbug=@old_debug;
SET debug_dbug=@old_debug;
SHOW TABLES;
Tables_in_test
t1
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/main/create_or_replace2.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ SET @old_debug= @@session.debug;

CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB;
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;
set debug_dbug=@old_debug;
SET debug_dbug=@old_debug;
SHOW TABLES;
show create table t1;
--sync_slave_with_master
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/main/drop_bad_db_type.result
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SET @save_dbug = @@debug_dbug;
set debug_dbug='+d,unstable_db_type';
SET @saved_dbug = @@debug_dbug;
SET debug_dbug='+d,unstable_db_type';
install soname 'ha_archive';
create table t1 (a int) engine=archive;
insert t1 values (1),(2),(3);
Expand Down Expand Up @@ -33,4 +33,4 @@ t1.frm
drop table t1;
db.opt
uninstall soname 'ha_archive';
set debug_dbug=@save_dbug;
SET debug_dbug=@saved_dbug;
6 changes: 3 additions & 3 deletions mysql-test/main/drop_bad_db_type.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ if (!$HA_ARCHIVE_SO) {

let $mysqld_datadir= `select @@datadir`;

SET @save_dbug = @@debug_dbug;
set debug_dbug='+d,unstable_db_type';
SET @saved_dbug = @@debug_dbug;
SET debug_dbug='+d,unstable_db_type';

install soname 'ha_archive';
create table t1 (a int) engine=archive;
Expand All @@ -28,4 +28,4 @@ drop table t1;
--list_files $mysqld_datadir/test
uninstall soname 'ha_archive';

set debug_dbug=@save_dbug;
SET debug_dbug=@saved_dbug;
5 changes: 3 additions & 2 deletions mysql-test/main/engine_error_in_alter-8453.result
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
create table t1 (a int, b int);
set debug_dbug='+d,external_lock_failure';
SET @saved_dbug = @@SESSION.debug_dbug;
SET debug_dbug='+d,external_lock_failure';
alter table t1 add column c int;
ERROR HY000: Got error 168 'KABOOM!' from MyISAM
set debug_dbug='';
SET debug_dbug= @saved_dbug;
drop table t1;
5 changes: 3 additions & 2 deletions mysql-test/main/engine_error_in_alter-8453.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
--source include/have_debug.inc

create table t1 (a int, b int);
set debug_dbug='+d,external_lock_failure';
SET @saved_dbug = @@SESSION.debug_dbug;
SET debug_dbug='+d,external_lock_failure';
--error ER_GET_ERRMSG
alter table t1 add column c int;
set debug_dbug='';
SET debug_dbug= @saved_dbug;
drop table t1;
11 changes: 6 additions & 5 deletions mysql-test/main/error_simulation.result
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ INSERT INTO t1 VALUES
('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'),
('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK');
set tmp_table_size=1024;
SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,raise_error";
SELECT MAX(a) FROM t1 GROUP BY a,b;
ERROR 23000: Can't write; duplicate key in table '(temporary)'
Expand All @@ -22,7 +23,7 @@ CREATE TABLE t1 (a INT(100) NOT NULL);
INSERT INTO t1 VALUES (1), (0), (2);
SET SESSION debug_dbug='+d,alter_table_only_index_change';
ALTER TABLE t1 ADD INDEX a(a);
SET SESSION debug_dbug=DEFAULT;
SET debug_dbug= @saved_dbug;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
Expand All @@ -42,7 +43,7 @@ CREATE TABLE t1(a BLOB);
SET SESSION debug_dbug="+d,bug42064_simulate_oom";
INSERT INTO t1 VALUES("");
Got one of the listed errors
SET SESSION debug_dbug=DEFAULT;
SET debug_dbug= @saved_dbug;
DROP TABLE t1;
#
# Bug#41660: Sort-index_merge for non-first join table may require
Expand Down Expand Up @@ -79,7 +80,7 @@ a a b filler
7 1 1 data
8 1 1 data
9 1 1 data
SET SESSION debug_dbug= DEFAULT;
SET debug_dbug= @saved_dbug;
SET optimizer_switch=@save_optimizer_switch;
DROP TABLE t1, t2;
#
Expand All @@ -92,7 +93,7 @@ INSERT INTO t2 VALUES (1),(2);
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);
ERROR 70100: Query execution was interrupted
SET SESSION debug_dbug = DEFAULT;
SET debug_dbug= @saved_dbug;
DROP TABLE t1,t2;
#
# End of 5.1 tests
Expand Down Expand Up @@ -126,4 +127,4 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory";
SELECT f1(1);
Got one of the listed errors
DROP FUNCTION f1;
SET SESSION debug_dbug=DEFAULT;
SET debug_dbug= @saved_dbug;
11 changes: 6 additions & 5 deletions mysql-test/main/error_simulation.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ set tmp_table_size=1024;

# Set debug flag so an error is returned when
# tmp table in query is converted from heap to myisam
SET @saved_dbug = @@SESSION.debug_dbug;
set session debug_dbug="+d,raise_error";

--error ER_DUP_KEY
Expand All @@ -36,7 +37,7 @@ CREATE TABLE t1 (a INT(100) NOT NULL);
INSERT INTO t1 VALUES (1), (0), (2);
SET SESSION debug_dbug='+d,alter_table_only_index_change';
ALTER TABLE t1 ADD INDEX a(a);
SET SESSION debug_dbug=DEFAULT;
SET debug_dbug= @saved_dbug;
SHOW CREATE TABLE t1;
SELECT * FROM t1;
DROP TABLE t1;
Expand All @@ -51,7 +52,7 @@ SET SESSION debug_dbug="+d,bug42064_simulate_oom";
# May fail with either ER_OUT_OF_RESOURCES or EE_OUTOFMEMORY
--error ER_OUT_OF_RESOURCES, 5
INSERT INTO t1 VALUES("");
SET SESSION debug_dbug=DEFAULT;
SET debug_dbug= @saved_dbug;

DROP TABLE t1;

Expand Down Expand Up @@ -84,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 );

SET SESSION debug_dbug= DEFAULT;
SET debug_dbug= @saved_dbug;

SET optimizer_switch=@save_optimizer_switch;

Expand All @@ -101,7 +102,7 @@ INSERT INTO t2 VALUES (1),(2);
SET SESSION debug_dbug="+d,bug11747970_raise_error";
--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);
SET SESSION debug_dbug = DEFAULT;
SET debug_dbug= @saved_dbug;
DROP TABLE t1,t2;


Expand Down Expand Up @@ -156,4 +157,4 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory";
--error ER_OUT_OF_RESOURCES, 5
SELECT f1(1);
DROP FUNCTION f1;
SET SESSION debug_dbug=DEFAULT;
SET debug_dbug= @saved_dbug;
3 changes: 1 addition & 2 deletions mysql-test/main/func_regexp_pcre_debug.result
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
SET debug_dbug='+d,pcre_exec_error_123';
SET STATEMENT debug_dbug='+d,pcre_exec_error_123' for
SELECT 'a' RLIKE 'a';
'a' RLIKE 'a'
0
Warnings:
Warning 1139 Got error 'pcre_exec: Internal error (-123)' from regexp
SET debug_dbug='';
SELECT 'a' RLIKE 'a';
'a' RLIKE 'a'
1
3 changes: 1 addition & 2 deletions mysql-test/main/func_regexp_pcre_debug.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
--source include/have_debug.inc

SET debug_dbug='+d,pcre_exec_error_123';
SET STATEMENT debug_dbug='+d,pcre_exec_error_123' for
SELECT 'a' RLIKE 'a';
SET debug_dbug='';
SELECT 'a' RLIKE 'a';
4 changes: 2 additions & 2 deletions mysql-test/main/log_slow_debug.result
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SET @@GLOBAL.log_output='TABLE';
FLUSH SLOW LOGS;
SET @@GLOBAL.slow_query_log=ON;
SET @@GLOBAL.log_slow_admin_statements=ON;
SET @save_dbug = @@debug_dbug;
SET @saved_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,simulate_slow_query";
CREATE PROCEDURE show_slow_log()
BEGIN
Expand Down Expand Up @@ -218,7 +218,7 @@ sql_text
#
# Clean up
#
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug=@saved_dbug;
TRUNCATE mysql.slow_log;
SET @@global.slow_query_log= @org_slow_query_log;
SET @@global.log_output= @org_log_output;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/main/log_slow_debug.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SET @@GLOBAL.log_output='TABLE';
FLUSH SLOW LOGS;
SET @@GLOBAL.slow_query_log=ON;
SET @@GLOBAL.log_slow_admin_statements=ON;
SET @save_dbug = @@debug_dbug;
SET @saved_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,simulate_slow_query";

DELIMITER $$;
Expand Down Expand Up @@ -87,7 +87,7 @@ CALL show_slow_log();
--echo # Clean up
--echo #

SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug=@saved_dbug;
TRUNCATE mysql.slow_log;
SET @@global.slow_query_log= @org_slow_query_log;
SET @@global.log_output= @org_log_output;
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/main/mdev6830.result
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SET @saved_dbug = @@SESSION.debug_dbug;
set @@debug_dbug= 'd,opt';
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t2 (
Expand Down Expand Up @@ -46,3 +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
drop table t1,t2,t3,t4;
drop view v2,v3;
SET debug_dbug= @saved_dbug;
4 changes: 2 additions & 2 deletions mysql-test/main/mdev6830.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# MDEV-6830 Server crashes in best_access_path after a sequence of SELECTs invollving a temptable view
#
--source include/have_debug.inc

SET @saved_dbug = @@SESSION.debug_dbug;
set @@debug_dbug= 'd,opt';

CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM;
Expand Down Expand Up @@ -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 view v2,v3;

SET debug_dbug= @saved_dbug;
2 changes: 1 addition & 1 deletion mysql-test/main/merge-big.result
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ drop table if exists t1,t2,t3,t4,t5,t6;
CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
LOCK TABLE t1 WRITE;
connect con1,localhost,root,,;
SET @orig_debug=@@debug;
SET @orig_debug=@@global.debug_dbug;
SET GLOBAL debug_dbug="+d,sleep_open_and_lock_after_open";
INSERT INTO t1 VALUES (1);
connection default;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/merge-big.test
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LOCK TABLE t1 WRITE;
#SELECT NOW();
connect (con1,localhost,root,,);
let $con1_id= `SELECT CONNECTION_ID()`;
SET @orig_debug=@@debug;
SET @orig_debug=@@global.debug_dbug;
SET GLOBAL debug_dbug="+d,sleep_open_and_lock_after_open";
send INSERT INTO t1 VALUES (1);
connection default;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/merge_debug.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set global storage_engine=myisam;
set session storage_engine=myisam;
call mtr.add_suppression("Index for table .*crashed' is corrupt; try to repair it");
drop table if exists crashed,t2,t3,t4;
SET @orig_debug=@@debug;
SET @orig_debug=@@global.debug_dbug;
CREATE TABLE crashed (c1 INT);
CREATE TABLE t2 (c1 INT);
CREATE TABLE t3 (c1 INT);
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/merge_debug.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ call mtr.add_suppression("Index for table .*crashed' is corrupt; try to repair i
drop table if exists crashed,t2,t3,t4;
--enable_warnings

SET @orig_debug=@@debug;
SET @orig_debug=@@global.debug_dbug;

#
# Check that MariaDB handles reopen that fails without crashing
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/main/myisam_debug.result
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ create table t1 (a int, index(a));
lock tables t1 write;
insert t1 values (1),(2),(1);
set @old_dbug=@@debug_dbug;
set debug_dbug='+d,mi_lock_database_failure';
SET debug_dbug='+d,mi_lock_database_failure';
unlock tables;
Warnings:
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
set debug_dbug=@old_dbug;
SET debug_dbug=@old_dbug;
drop table t1;
4 changes: 2 additions & 2 deletions mysql-test/main/myisam_debug.test
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ create table t1 (a int, index(a));
lock tables t1 write;
insert t1 values (1),(2),(1);
set @old_dbug=@@debug_dbug;
set debug_dbug='+d,mi_lock_database_failure';
SET debug_dbug='+d,mi_lock_database_failure';
unlock tables;
set debug_dbug=@old_dbug;
SET debug_dbug=@old_dbug;
drop table t1;
3 changes: 2 additions & 1 deletion mysql-test/main/range_innodb.result
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ key(a),key(b),key(c)
insert into t1
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;
SET @saved_dbug = @@GLOBAL.debug_dbug;
set @@global.debug_dbug="+d,ha_index_init_fail";
explain select * from t1 where a=10 and b=10;
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 1 Using intersect(a,b); Using where
select * from t1 where a=10 and b=10;
ERROR HY000: Table definition has changed, please retry transaction
DROP TABLE t0,t1;
set @@global.debug_dbug="-d";
SET @@GLOBAL.debug_dbug = @saved_dbug;
set @@optimizer_switch= @optimizer_switch_save;
3 changes: 2 additions & 1 deletion mysql-test/main/range_innodb.test
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ create table t1 (
insert into t1
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;
SET @saved_dbug = @@GLOBAL.debug_dbug;
set @@global.debug_dbug="+d,ha_index_init_fail";
explain select * from t1 where a=10 and b=10;
--error ER_TABLE_DEF_CHANGED
select * from t1 where a=10 and b=10;
DROP TABLE t0,t1;
set @@global.debug_dbug="-d";
SET @@GLOBAL.debug_dbug = @saved_dbug;
set @@optimizer_switch= @optimizer_switch_save;
4 changes: 2 additions & 2 deletions mysql-test/main/range_interrupted-13751.result
Original file line number Diff line number Diff line change
Expand Up @@ -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;
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
WHERE alias1.c = alias2.c OR alias1.i <= 1
;
ERROR 70100: Query execution was interrupted
set debug_dbug=@old_dbug;
SET debug_dbug=@old_dbug;
DROP TABLE t1;
Loading

0 comments on commit e709eb9

Please sign in to comment.