Merge 10.0-base -> 10.0

This commit is contained in:
unknown 2013-05-03 12:10:16 +02:00
commit d0d05dae07
84 changed files with 529 additions and 187 deletions

View File

@ -392,7 +392,7 @@ SHOW SESSION VARIABLES LIKE "%_checks";
--echo # INSERT INTO t1 VALUES(2) --echo # INSERT INTO t1 VALUES(2)
--echo # foreign_key_checks=1 and unique_checks=1 --echo # foreign_key_checks=1 and unique_checks=1
--echo # It should not change current session's variables, even error happens --echo # It should not change current session's variables, even error happens
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., error.* 1062");
--error 1062 --error 1062
BINLOG ' BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=

View File

@ -52,7 +52,7 @@
# - Replication has been initialized by include/master-slave.inc # - Replication has been initialized by include/master-slave.inc
# #
# - The test adds a suppression for the following warning: # - The test adds a suppression for the following warning:
# Slave: Can't find record in 't1' Error_code: 1032 # Slave: Can't find record in 't1' error.* 1032
--echo ==== Initialize ==== --echo ==== Initialize ====
@ -97,7 +97,7 @@ if (`SELECT @@global.binlog_format != 'ROW' OR @@global.slave_exec_mode = 'STRIC
--disable_query_log --disable_query_log
--eval SELECT "$err" as 'Last_SQL_Error (expected "duplicate key" error)' --eval SELECT "$err" as 'Last_SQL_Error (expected "duplicate key" error)'
--enable_query_log --enable_query_log
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* error.* 1062");
SELECT * FROM t1; SELECT * FROM t1;
@ -143,7 +143,7 @@ connection slave;
# replication continues. # replication continues.
if (`SELECT @@global.binlog_format = 'ROW' AND @@global.slave_exec_mode = 'STRICT'`) { if (`SELECT @@global.binlog_format = 'ROW' AND @@global.slave_exec_mode = 'STRICT'`) {
--echo ---- Wait until slave stops with an error ---- --echo ---- Wait until slave stops with an error ----
call mtr.add_suppression("Slave SQL.*Can.t find record in .t1., Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Can.t find record in .t1., error.* 1032");
let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND
source include/wait_for_slave_sql_error.inc; source include/wait_for_slave_sql_error.inc;

View File

@ -126,10 +126,10 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
--disable_query_log --disable_query_log
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave.*Can.t DROP .c7.; check that column.key exists.* Error_code: 1091"); call mtr.add_suppression("Slave.*Can.t DROP .c7.; check that column.key exists.* error.* 1091");
call mtr.add_suppression("Slave.*Unknown column .c7. in .t15.* Error_code: 1054"); call mtr.add_suppression("Slave.*Unknown column .c7. in .t15.* error.* 1054");
call mtr.add_suppression("Slave.*Key column .c6. doesn.t exist in table.* Error_code: 1072"); call mtr.add_suppression("Slave.*Key column .c6. doesn.t exist in table.* error.* 1072");
call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* error.* 1677");
--enable_query_log --enable_query_log
sync_slave_with_master; sync_slave_with_master;

View File

@ -13,8 +13,8 @@
# should stop the slave. # # should stop the slave. #
################################################# #################################################
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); call mtr.add_suppression("Slave: Unknown table 't6' error.* 1051");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* error.* 1677");
--echo **** Diff Table Def Start **** --echo **** Diff Table Def Start ****
@ -771,9 +771,9 @@ RESET MASTER;
connection slave; connection slave;
START SLAVE; START SLAVE;
call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051"); call mtr.add_suppression("Error .Unknown table .t6.. on query.* error.* 1051");
call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: 1060"); call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* error.* 1060");
call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535"); call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* error.* 1535");
--echo *** Master Data Insert *** --echo *** Master Data Insert ***
connection master; connection master;

View File

@ -68,8 +68,8 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
save_master_pos; save_master_pos;
connection slave; connection slave;
# 1062 = ER_DUP_ENTRY # 1062 = ER_DUP_ENTRY
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* error.* 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0"); call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*error.* 0");
--let $slave_sql_errno= 1062 --let $slave_sql_errno= 1062
--source include/wait_for_slave_sql_error_and_skip.inc --source include/wait_for_slave_sql_error_and_skip.inc

View File

@ -417,9 +417,9 @@ source include/diff_tables.inc;
connection slave; connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* error.* 1032");
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, error.* 1677");
--let $rpl_only_running_threads= 1 --let $rpl_only_running_threads= 1
--source include/rpl_reset.inc --source include/rpl_reset.inc

View File

@ -147,8 +147,8 @@ sync_slave_with_master;
connection master; connection master;
INSERT INTO t4 VALUES (4); INSERT INTO t4 VALUES (4);
connection slave; connection slave;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* error.* 1677");
--let $slave_skip_counter= 2 --let $slave_skip_counter= 2
--let $slave_sql_errno= 1677 --let $slave_sql_errno= 1677
--let $show_slave_sql_error= 1 --let $show_slave_sql_error= 1

View File

@ -25,7 +25,7 @@ drop table t1;
connection slave; connection slave;
--source include/wait_for_slave_sql_to_stop.inc --source include/wait_for_slave_sql_to_stop.inc
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* Error_code: 0"); call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* error.* 0");
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
--echo Error: "$error" (expected different error codes on master and slave) --echo Error: "$error" (expected different error codes on master and slave)

View File

@ -177,7 +177,7 @@ INSERT INTO global_suppressions VALUES
("The path specified for the variable .* is not a directory or cannot be written:"), ("The path specified for the variable .* is not a directory or cannot be written:"),
("Master server does not support or not configured semi-sync replication, fallback to asynchronous"), ("Master server does not support or not configured semi-sync replication, fallback to asynchronous"),
(": The MySQL server is running with the --secure-backup-file-priv option so it cannot execute this statement"), (": The MySQL server is running with the --secure-backup-file-priv option so it cannot execute this statement"),
("Slave: Unknown table 't1' Error_code: 1051"), ("Slave: Unknown table 't1' error.* 1051"),
/* Maria storage engine dependent tests */ /* Maria storage engine dependent tests */

View File

@ -312,7 +312,7 @@ sub mtr_report_stats ($) {
/Slave: The incident LOST_EVENTS occured on the master/ or /Slave: The incident LOST_EVENTS occured on the master/ or
/Slave: Unknown error.* 1105/ or /Slave: Unknown error.* 1105/ or
/Slave: Can't drop database.* database doesn't exist/ or /Slave: Can't drop database.* database doesn't exist/ or
/Slave SQL:.*(?:Error_code: \d+|Query:.*)/ or /Slave SQL:.*(?:error.* \d+|Query:.*)/ or
/Sort aborted/ or /Sort aborted/ or
/Time-out in NDB/ or /Time-out in NDB/ or
/One can only use the --user.*root/ or /One can only use the --user.*root/ or
@ -361,7 +361,7 @@ sub mtr_report_stats ($) {
# rpl_extrColmaster_*.test, the slave thread produces warnings # rpl_extrColmaster_*.test, the slave thread produces warnings
# when it get updates to a table that has more columns on the # when it get updates to a table that has more columns on the
# master # master
/Slave: Unknown column 'c7' in 't15' Error_code: 1054/ or /Slave: Unknown column 'c7' in 't15' error.* 1054/ or
/Slave: Can't DROP 'c7'.* 1091/ or /Slave: Can't DROP 'c7'.* 1091/ or
/Slave: Key column 'c6'.* 1072/ or /Slave: Key column 'c6'.* 1072/ or
@ -370,8 +370,8 @@ sub mtr_report_stats ($) {
# rpl_idempotency.test produces warnings for the slave. # rpl_idempotency.test produces warnings for the slave.
($testname eq 'rpl.rpl_idempotency' and ($testname eq 'rpl.rpl_idempotency' and
(/Slave: Can\'t find record in \'t1\' Error_code: 1032/ or (/Slave: Can\'t find record in \'t1\' error.* 1032/ or
/Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452/ /Slave: Cannot add or update a child row: a foreign key constraint fails .* error.* 1452/
)) or )) or
# These tests does "kill" on queries, causing sporadic errors when writing to logs # These tests does "kill" on queries, causing sporadic errors when writing to logs
@ -389,7 +389,7 @@ sub mtr_report_stats ($) {
# rpl_temporary has an error on slave that can be ignored # rpl_temporary has an error on slave that can be ignored
($testname eq 'rpl.rpl_temporary' and ($testname eq 'rpl.rpl_temporary' and
(/Slave: Can\'t find record in \'user\' Error_code: 1032/ (/Slave: Can\'t find record in \'user\' error.* 1032/
)) or )) or
# Test case for Bug#31590 produces the following error: # Test case for Bug#31590 produces the following error:
/Out of sort memory; increase server sort buffer size/ or /Out of sort memory; increase server sort buffer size/ or

View File

@ -537,7 +537,7 @@ sub main {
} }
} }
if ( not defined @$completed ) { if ( not @$completed ) {
mtr_error("Test suite aborted"); mtr_error("Test suite aborted");
} }
@ -4743,8 +4743,8 @@ sub extract_warning_lines ($$) {
qr/InnoDB: Error: table `test`.`t[12]` .*does not exist in the InnoDB internal/, qr/InnoDB: Error: table `test`.`t[12]` .*does not exist in the InnoDB internal/,
qr/InnoDB: Warning: Setting innodb_use_sys_malloc/, qr/InnoDB: Warning: Setting innodb_use_sys_malloc/,
qr/InnoDB: Warning: a long semaphore wait:/, qr/InnoDB: Warning: a long semaphore wait:/,
qr/Slave: Unknown table 't1' Error_code: 1051/, qr/Slave: Unknown table 't1' .* 1051/,
qr/Slave SQL:.*(Error_code: [[:digit:]]+|Query:.*)/, qr/Slave SQL:.*(Internal MariaDB error code: [[:digit:]]+|Query:.*)/,
qr/slave SQL thread aborted/, qr/slave SQL thread aborted/,
qr/unknown option '--loose[-_]/, qr/unknown option '--loose[-_]/,
qr/unknown variable 'loose[-_]/, qr/unknown variable 'loose[-_]/,

View File

@ -431,7 +431,7 @@ Success: Was able to run 'execute stmt1' under FTWRL.
Success: Was able to run 'execute stmt1' with FTWRL active in another connection. Success: Was able to run 'execute stmt1' with FTWRL active in another connection.
Success: Was able to run FTWRL while 'execute stmt1' was active in another connection. Success: Was able to run FTWRL while 'execute stmt1' was active in another connection.
deallocate prepare stmt1; deallocate prepare stmt1;
call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., Error_code: 1223"); call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., error.* 1223");
# #
# 9.2.b) EXECUTE for statement which is incompatible with FTWRL # 9.2.b) EXECUTE for statement which is incompatible with FTWRL
# should be also incompatible. # should be also incompatible.

View File

@ -93,9 +93,9 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
'; ';
ERROR HY000: master may suffer from http://bugs.mysql.com/bug.php?id=37426 so slave stops; check error log on slave for more info ERROR HY000: master may suffer from http://bugs.mysql.com/bug.php?id=37426 so slave stops; check error log on slave for more info
drop table t1, char63_utf8, char128_utf8; drop table t1, char63_utf8, char128_utf8;
call mtr.add_suppression("Slave SQL.*master suffers from this bug: http:..bugs.mysql.com.bug.php.id=37426.* Error_code: 1105"); call mtr.add_suppression("Slave SQL.*master suffers from this bug: http:..bugs.mysql.com.bug.php.id=37426.* error.* 1105");
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.char128_utf8. cannot be converted.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.char128_utf8. cannot be converted.* error.* 1677");
# #
# Bug #54393: crash and/or valgrind errors in # Bug #54393: crash and/or valgrind errors in
# mysql_client_binlog_statement # mysql_client_binlog_statement

View File

@ -831,7 +831,7 @@ unique_checks OFF
# INSERT INTO t1 VALUES(2) # INSERT INTO t1 VALUES(2)
# foreign_key_checks=1 and unique_checks=1 # foreign_key_checks=1 and unique_checks=1
# It should not change current session's variables, even error happens # It should not change current session's variables, even error happens
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., error.* 1062");
BINLOG ' BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==

View File

@ -643,7 +643,7 @@ unique_checks OFF
# INSERT INTO t1 VALUES(2) # INSERT INTO t1 VALUES(2)
# foreign_key_checks=1 and unique_checks=1 # foreign_key_checks=1 and unique_checks=1
# It should not change current session's variables, even error happens # It should not change current session's variables, even error happens
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., error.* 1062");
BINLOG ' BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==

View File

@ -151,9 +151,9 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
drop table t1, char63_utf8, char128_utf8; drop table t1, char63_utf8, char128_utf8;
call mtr.add_suppression("Slave SQL.*master suffers from this bug: http:..bugs.mysql.com.bug.php.id=37426.* Error_code: 1105"); call mtr.add_suppression("Slave SQL.*master suffers from this bug: http:..bugs.mysql.com.bug.php.id=37426.* error.* 1105");
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.char128_utf8. cannot be converted.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.char128_utf8. cannot be converted.* error.* 1677");
--echo # --echo #
--echo # Bug #54393: crash and/or valgrind errors in --echo # Bug #54393: crash and/or valgrind errors in

View File

@ -0,0 +1,30 @@
change master '' to master_port=MYPORT_1, master_host='127.0.0.1', master_user='root';
change master 'master2' to master_port=MYPORT_2, master_host='127.0.0.1', master_user='root';
start all slaves;
Warnings:
Note 1937 SLAVE 'master2' started
Note 1937 SLAVE '' started
set default_master_connection = '';
include/wait_for_slave_to_start.inc
set default_master_connection = 'master2';
include/wait_for_slave_to_start.inc
set default_master_connection = '';
create table t1 (a varchar(10) character set utf8);
load data infile '../../std_data/loaddata6.dat' into table t1;
create table t2 (a varchar(10) character set utf8);
load data infile '../../std_data/loaddata6.dat' into table t2;
select count(*) from t1;
count(*)
1
select count(*) from t2;
count(*)
1
drop table t1;
drop table t2;
stop all slaves;
Warnings:
Note 1938 SLAVE 'master2' stopped
Note 1938 SLAVE '' stopped
include/reset_master_slave.inc
include/reset_master_slave.inc
include/reset_master_slave.inc

View File

@ -0,0 +1,70 @@
#
# Simple multi-master test
#
--source include/not_embedded.inc
--let $rpl_server_count= 0
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
--connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1)
--connect (master2,127.0.0.1,root,,,$SERVER_MYPORT_2)
--connection slave
--replace_result $SERVER_MYPORT_1 MYPORT_1
eval change master '' to master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root';
--replace_result $SERVER_MYPORT_2 MYPORT_2
eval change master 'master2' to master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root';
start all slaves;
set default_master_connection = '';
--source include/wait_for_slave_to_start.inc
set default_master_connection = 'master2';
--source include/wait_for_slave_to_start.inc
#
# Now test doing a load data infile from both connections
#
set default_master_connection = '';
--connection master1
create table t1 (a varchar(10) character set utf8);
load data infile '../../std_data/loaddata6.dat' into table t1;
--save_master_pos
--connection slave
--sync_with_master 0,''
--connection master2
create table t2 (a varchar(10) character set utf8);
load data infile '../../std_data/loaddata6.dat' into table t2;
--save_master_pos
--connection slave
--sync_with_master 0,'master2'
select count(*) from t1;
select count(*) from t2;
--connection master1
drop table t1;
--connection master2
drop table t2;
#
# clean up
#
--connection master1
--save_master_pos
--connection slave
--sync_with_master 0,''
--connection master2
--save_master_pos
--connection slave
--sync_with_master 0,'master2'
--connection slave
stop all slaves;
--source reset_master_slave.inc
--disconnect slave
--connection master1
--source reset_master_slave.inc
--disconnect master1
--connection master2
--source reset_master_slave.inc
--disconnect master2

View File

@ -47,7 +47,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
include/start_slave.inc include/start_slave.inc
INSERT INTO t1 VALUES(6,'C',2); INSERT INTO t1 VALUES(6,'C',2);
INSERT INTO t1(b,c) VALUES('B',2); INSERT INTO t1(b,c) VALUES('B',2);
call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* error.* 1062");
include/wait_for_slave_sql_error.inc [errno=1062] include/wait_for_slave_sql_error.inc [errno=1062]
INSERT INTO t1(b,c) VALUES('A',2); INSERT INTO t1(b,c) VALUES('A',2);
INSERT INTO t1(b,c) VALUES('D',2); INSERT INTO t1(b,c) VALUES('D',2);

View File

@ -5,7 +5,7 @@ call mtr.add_suppression('Slave I/O: Relay log write failure: could not queue ev
call mtr.add_suppression('event read from binlog did not pass crc check'); call mtr.add_suppression('event read from binlog did not pass crc check');
call mtr.add_suppression('Replication event checksum verification failed'); call mtr.add_suppression('Replication event checksum verification failed');
call mtr.add_suppression('Event crc check failed! Most likely there is event corruption'); call mtr.add_suppression('Event crc check failed! Most likely there is event corruption');
call mtr.add_suppression('Slave SQL: Error initializing relay log position: I/O error reading event at position .*, Error_code: 1593'); call mtr.add_suppression('Slave SQL: Error initializing relay log position: I/O error reading event at position .*, error.* 1593');
SET @old_master_verify_checksum = @@master_verify_checksum; SET @old_master_verify_checksum = @@master_verify_checksum;
# 1. Creating test table/data and set corruption position for testing # 1. Creating test table/data and set corruption position for testing
* insert/update/delete rows in table t1 * * insert/update/delete rows in table t1 *

View File

@ -85,7 +85,7 @@ show grants for rpl_do_grant2@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
show grants for rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' error.* 1396");
DROP DATABASE IF EXISTS bug42217_db; DROP DATABASE IF EXISTS bug42217_db;
CREATE DATABASE bug42217_db; CREATE DATABASE bug42217_db;
GRANT CREATE ROUTINE ON bug42217_db.* TO 'create_rout_db'@'localhost' GRANT CREATE ROUTINE ON bug42217_db.* TO 'create_rout_db'@'localhost'

View File

@ -1,7 +1,7 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); call mtr.add_suppression("Slave: Unknown table 't6' error.* 1051");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* error.* 1677");
**** Diff Table Def Start **** **** Diff Table Def Start ****
*** On Slave *** *** On Slave ***
STOP SLAVE; STOP SLAVE;
@ -462,9 +462,9 @@ c4 BLOB, c5 CHAR(5)) ENGINE='InnoDB';
RESET MASTER; RESET MASTER;
*** Start Slave *** *** Start Slave ***
START SLAVE; START SLAVE;
call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051"); call mtr.add_suppression("Error .Unknown table .t6.. on query.* error.* 1051");
call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: 1060"); call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* error.* 1060");
call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535"); call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* error.* 1535");
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);

View File

@ -1,7 +1,7 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); call mtr.add_suppression("Slave: Unknown table 't6' error.* 1051");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* error.* 1677");
**** Diff Table Def Start **** **** Diff Table Def Start ****
*** On Slave *** *** On Slave ***
STOP SLAVE; STOP SLAVE;
@ -462,9 +462,9 @@ c4 BLOB, c5 CHAR(5)) ENGINE='MyISAM';
RESET MASTER; RESET MASTER;
*** Start Slave *** *** Start Slave ***
START SLAVE; START SLAVE;
call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051"); call mtr.add_suppression("Error .Unknown table .t6.. on query.* error.* 1051");
call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: 1060"); call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* error.* 1060");
call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535"); call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* error.* 1535");
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);

View File

@ -50,7 +50,7 @@ UPDATE t4 LEFT JOIN (t1, t2, t5) ON (t1.id=t4.id and t2.id=t4.id and t5.id=t4.id
UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id) SET a=0, d=0, f=0, g=0 where t4.id=1; UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id) SET a=0, d=0, f=0, g=0 where t4.id=1;
UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1; UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1; UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1;
call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* Error_code: 1146"); call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* error.* 1146");
UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1; UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1;
include/wait_for_slave_sql_error_and_skip.inc [errno=1146] include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1'' Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1''

View File

@ -42,7 +42,7 @@ UPDATE t4 LEFT JOIN (t1, t2, t5) ON (t1.id=t4.id and t2.id=t4.id and t5.id=t4.id
UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id) SET a=0, d=0, f=0, g=0 where t4.id=1; UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id) SET a=0, d=0, f=0, g=0 where t4.id=1;
UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1; UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1; UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1;
call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* Error_code: 1146"); call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* error.* 1146");
UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1; UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1;
include/wait_for_slave_sql_error_and_skip.inc [errno=1146] include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1'' Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1''

View File

@ -0,0 +1,57 @@
include/rpl_init.inc [topology=1->2,1->3]
create table t1 (n int);
insert into t1 values (1);
insert into t1 values (2);
include/stop_slave.inc
include/wait_for_slave_to_stop.inc
include/stop_slave.inc
include/wait_for_slave_to_stop.inc
reset slave all;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
master_user='root', MASTER_USE_GTID=1;
include/start_slave.inc
include/wait_for_slave_to_start.inc
flush logs;
insert into t1 values (3);
insert into t1 values (4);
flush logs;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
MASTER_USE_GTID=1;
include/start_slave.inc
select * from t1 order by n;
n
1
2
3
4
show binary logs;
Log_name File_size
master-bin.000001 #
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t1 (n int)
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; insert into t1 values (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; insert into t1 values (2)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; insert into t1 values (3)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; insert into t1 values (4)
master-bin.000001 # Query # # COMMIT
include/stop_slave.inc
include/wait_for_slave_to_stop.inc
reset slave all;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1,
master_user = 'root', MASTER_USE_GTID=1;
include/start_slave.inc
include/stop_slave.inc
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1,
MASTER_USE_GTID=1;
include/start_slave.inc
drop table t1;
include/rpl_end.inc

View File

@ -129,7 +129,7 @@ a
2 2
3 3
SET SQL_LOG_BIN=0; SET SQL_LOG_BIN=0;
call mtr.add_suppression("Slave: Table 't1' already exists Error_code: 1050"); call mtr.add_suppression("Slave: Table 't1' already exists error.* 1050");
SET SQL_LOG_BIN=1; SET SQL_LOG_BIN=1;
*** Test reconnecting slave with GTID after purge logs on master. *** *** Test reconnecting slave with GTID after purge logs on master. ***
FLUSH LOGS; FLUSH LOGS;

View File

@ -204,7 +204,7 @@ Heartbeat event received
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT); CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT);
INSERT INTO t1 VALUES (1, 'on slave', NULL); INSERT INTO t1 VALUES (1, 'on slave', NULL);
INSERT INTO t1 VALUES (1, 'on master', NULL); INSERT INTO t1 VALUES (1, 'on master', NULL);
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* error.* 1062");
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");
Heartbeat events are received while sql thread stopped (1 means 'yes'): 1 Heartbeat events are received while sql thread stopped (1 means 'yes'): 1
include/stop_slave.inc include/stop_slave.inc

View File

@ -1,9 +1,9 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
call mtr.add_suppression("Slave SQL.*Can.t find record in .t[12].* Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Can.t find record in .t[12].* error.* 1032");
call mtr.add_suppression("Slave SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Slave SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* error.* 1451");
call mtr.add_suppression("Slave SQL.*Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); call mtr.add_suppression("Slave SQL.*Cannot add or update a child row: a foreign key constraint fails .* error.* 1452");
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* error.* 1062");
CREATE TABLE t1 (a INT PRIMARY KEY); CREATE TABLE t1 (a INT PRIMARY KEY);
CREATE TABLE t2 (a INT); CREATE TABLE t2 (a INT);
INSERT INTO t1 VALUES (-1),(-2),(-3); INSERT INTO t1 VALUES (-1),(-2),(-3);

View File

@ -116,7 +116,7 @@ show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
set global slave_exec_mode='IDEMPOTENT'; set global slave_exec_mode='IDEMPOTENT';
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* error.* 1032");
drop table t1, mysqltest2.t2; drop table t1, mysqltest2.t2;
drop table t4; drop table t4;
drop database mysqltest2; drop database mysqltest2;

View File

@ -27,8 +27,8 @@ drop table t3;
create table t1(a int, b int, unique(b)); create table t1(a int, b int, unique(b));
insert into t1 values(1,10); insert into t1 values(1,10);
load data infile '../../std_data/rpl_loaddata.dat' into table t1; load data infile '../../std_data/rpl_loaddata.dat' into table t1;
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* error.* 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0"); call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*error.* 0");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062] include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
include/check_slave_no_error.inc include/check_slave_no_error.inc
set sql_log_bin=0; set sql_log_bin=0;

View File

@ -3,7 +3,7 @@ include/master-slave.inc
CREATE TABLE t1 (a INT, b INT); CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,10); INSERT INTO t1 VALUES (1,10);
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
call mtr.add_suppression("Slave SQL.*Fatal error: Not enough memory, Error_code: 1593"); call mtr.add_suppression("Slave SQL.*Fatal error: Not enough memory, error.* 1593");
include/wait_for_slave_sql_error_and_skip.inc [errno=1593] include/wait_for_slave_sql_error_and_skip.inc [errno=1593]
Last_SQL_Error = 'Fatal error: Not enough memory' Last_SQL_Error = 'Fatal error: Not enough memory'
DROP TABLE t1; DROP TABLE t1;

View File

@ -1,6 +1,6 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, Error_code: 1153"); call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153");
call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet"); call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet");
drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;

View File

@ -38,7 +38,7 @@ drop table temp_table, t3;
insert into t2 values(1234); insert into t2 values(1234);
set insert_id=1234; set insert_id=1234;
insert into t2 values(NULL); insert into t2 values(NULL);
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* error.* 1062");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062] include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
purge master logs to 'master-bin.000002'; purge master logs to 'master-bin.000002';
show master logs; show master logs;

View File

@ -72,7 +72,7 @@ DROP TABLE t1;
include/rpl_reset.inc include/rpl_reset.inc
**** On Slave **** **** On Slave ****
SET GLOBAL QUERY_CACHE_SIZE=0; SET GLOBAL QUERY_CACHE_SIZE=0;
call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1.* Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1.* error.* 1032");
**** On Master **** **** On Master ****
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (1),(2),(3);

View File

@ -482,9 +482,9 @@ INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
include/diff_tables.inc [master:t2, slave:t2] include/diff_tables.inc [master:t2, slave:t2]
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* error.* 1032");
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, error.* 1677");
include/rpl_reset.inc include/rpl_reset.inc
[expecting slave to replicate correctly] [expecting slave to replicate correctly]
INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (1, "", 1);

View File

@ -485,9 +485,9 @@ INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
include/diff_tables.inc [master:t2, slave:t2] include/diff_tables.inc [master:t2, slave:t2]
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* error.* 1032");
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, error.* 1677");
include/rpl_reset.inc include/rpl_reset.inc
[expecting slave to replicate correctly] [expecting slave to replicate correctly]
INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (1, "", 1);

View File

@ -265,8 +265,8 @@ STOP SLAVE;
RESET SLAVE; RESET SLAVE;
RESET MASTER; RESET MASTER;
START SLAVE; START SLAVE;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 0 ...e mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 0 ...e mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* error.* 1677");
*** Cleanup *** *** Cleanup ***
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
include/rpl_end.inc include/rpl_end.inc

View File

@ -1,6 +1,6 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: .*"); call mtr.add_suppression("Slave: Can\'t find record in \'t1\' error.* .*");
call mtr.add_suppression("Can't find record in 't.'"); call mtr.add_suppression("Can't find record in 't.'");
[on slave] [on slave]
SET @old_slave_exec_mode= @@global.slave_exec_mode; SET @old_slave_exec_mode= @@global.slave_exec_mode;
@ -24,7 +24,7 @@ a
include/wait_for_slave_sql_error.inc [errno=1062] include/wait_for_slave_sql_error.inc [errno=1062]
Last_SQL_Error (expected "duplicate key" error) Last_SQL_Error (expected "duplicate key" error)
Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos END_LOG_POS Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos END_LOG_POS
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* error.* 1062");
SELECT * FROM t1; SELECT * FROM t1;
a a
1 1
@ -51,7 +51,7 @@ SELECT * FROM t1;
a a
[on slave] [on slave]
---- Wait until slave stops with an error ---- ---- Wait until slave stops with an error ----
call mtr.add_suppression("Slave SQL.*Can.t find record in .t1., Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Can.t find record in .t1., error.* 1032");
include/wait_for_slave_sql_error.inc [errno=1032] include/wait_for_slave_sql_error.inc [errno=1032]
Last_SQL_Error (expected "duplicate key" error) Last_SQL_Error (expected "duplicate key" error)
Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos END_LOG_POS Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos END_LOG_POS

View File

@ -1,9 +1,9 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
call mtr.add_suppression("Can.t find record in .t[12].* Error_code: 1032"); call mtr.add_suppression("Can.t find record in .t[12].* error.* 1032");
call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* error.* 1451");
call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* error.* 1452");
call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* Error_code: 1062"); call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* error.* 1062");
set @old_slave_exec_mode= @@global.slave_exec_mode; set @old_slave_exec_mode= @@global.slave_exec_mode;
set @@global.slave_exec_mode= IDEMPOTENT; set @@global.slave_exec_mode= IDEMPOTENT;
create table ti1 (b int primary key) engine = innodb; create table ti1 (b int primary key) engine = innodb;

View File

@ -10,7 +10,7 @@ DROP TABLE t1;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
==== Verify error on slave ==== ==== Verify error on slave ====
[on slave] [on slave]
call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t1. doesn.t exist., Error_code: 1146"); call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t1. doesn.t exist., error.* 1146");
include/wait_for_slave_sql_error.inc [errno=1146] include/wait_for_slave_sql_error.inc [errno=1146]
==== Clean up ==== ==== Clean up ====
include/stop_slave_io.inc include/stop_slave_io.inc

View File

@ -43,8 +43,8 @@ drop table t3;
create table t1(a int, b int, unique(b)); create table t1(a int, b int, unique(b));
insert into t1 values(1,10); insert into t1 values(1,10);
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* error.* 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0"); call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*error.* 0");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062] include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
include/check_slave_no_error.inc include/check_slave_no_error.inc
set sql_log_bin=0; set sql_log_bin=0;

View File

@ -117,8 +117,8 @@ a
include/check_slave_is_running.inc include/check_slave_is_running.inc
INSERT INTO t9 VALUES (4); INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4); INSERT INTO t4 VALUES (4);
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* error.* 1677");
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float'' Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float''
INSERT INTO t9 VALUES (5); INSERT INTO t9 VALUES (5);

View File

@ -117,8 +117,8 @@ a
include/check_slave_is_running.inc include/check_slave_is_running.inc
INSERT INTO t9 VALUES (4); INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4); INSERT INTO t4 VALUES (4);
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* error.* 1677");
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float'' Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float''
INSERT INTO t9 VALUES (5); INSERT INTO t9 VALUES (5);

View File

@ -56,7 +56,7 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET SQL_LOG_BIN=1; SET SQL_LOG_BIN=1;
call mtr.add_suppression("Slave SQL.*Could not execute .*te_rows event on table test.t.; Duplicate entry.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Could not execute .*te_rows event on table test.t.; Duplicate entry.* error.* 1062");
CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB; CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table

View File

@ -29,7 +29,7 @@ a b
SELECT * FROM t3 ORDER BY a; SELECT * FROM t3 ORDER BY a;
a b a b
1 ZZ 1 ZZ
call mtr.add_suppression("Slave SQL.*Table .test.t3. doesn.t exist.* Error_code: 1146"); call mtr.add_suppression("Slave SQL.*Table .test.t3. doesn.t exist.* error.* 1146");
include/wait_for_slave_sql_error.inc [errno=1146] include/wait_for_slave_sql_error.inc [errno=1146]
SHOW TABLES LIKE 't%'; SHOW TABLES LIKE 't%';
Tables_in_test (t%) Tables_in_test (t%)

View File

@ -14,8 +14,8 @@ include/stop_slave_io.inc
RESET SLAVE; RESET SLAVE;
drop table t1; drop table t1;
call mtr.add_suppression("Slave: Can't get stat of .*"); call mtr.add_suppression("Slave: Can't get stat of .*");
call mtr.add_suppression("Slave SQL: Error .Can.t get stat of.* Error_code: 13"); call mtr.add_suppression("Slave SQL: Error .Can.t get stat of.* error.* 13");
call mtr.add_suppression("Slave: File.* not found.*"); call mtr.add_suppression("Slave: File.* not found.*");
call mtr.add_suppression("Slave SQL: Error .File.* not found.* Error_code: 29"); call mtr.add_suppression("Slave SQL: Error .File.* not found.* error.* 29");
SET @@global.debug_dbug= ''; SET @@global.debug_dbug= '';
include/rpl_end.inc include/rpl_end.inc

View File

@ -1,7 +1,7 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
START SLAVE; START SLAVE;
call mtr.add_suppression("Slave SQL.*Unable to use slave.s temporary directory.* Error_code: 12"); call mtr.add_suppression("Slave SQL.*Unable to use slave.s temporary directory");
include/wait_for_slave_sql_error.inc [errno=12] include/wait_for_slave_sql_error.inc [errno=12]
include/stop_slave_io.inc include/stop_slave_io.inc
RESET SLAVE; RESET SLAVE;

View File

@ -8,7 +8,7 @@ insert into t1 values(1),(2);
ERROR 23000: Duplicate entry '2' for key 'a' ERROR 23000: Duplicate entry '2' for key 'a'
drop table t1; drop table t1;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_to_stop.inc
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* Error_code: 0"); call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* error.* 0");
Error: "Query caused different errors on master and slave. Error on master: message (format)='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave) Error: "Query caused different errors on master and slave. Error on master: message (format)='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
Errno: "0" (expected 0) Errno: "0" (expected 0)
drop table t1; drop table t1;

View File

@ -18,7 +18,7 @@ a
include/wait_for_slave_sql_error.inc [errno=1062] include/wait_for_slave_sql_error.inc [errno=1062]
Last_SQL_Error (expected "duplicate key" error) Last_SQL_Error (expected "duplicate key" error)
Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)' Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)'
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* error.* 1062");
SELECT * FROM t1; SELECT * FROM t1;
a a
1 1

View File

@ -44,8 +44,8 @@ drop table t3;
create table t1(a int, b int, unique(b)); create table t1(a int, b int, unique(b));
insert into t1 values(1,10); insert into t1 values(1,10);
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* error.* 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0"); call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*error.* 0");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062] include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
include/check_slave_no_error.inc include/check_slave_no_error.inc
set sql_log_bin=0; set sql_log_bin=0;

View File

@ -534,7 +534,7 @@ BIT(6) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(5) BIT(12) ALL_LOSSY,ALL_NON_LOSSY <Correct value> BIT(5) BIT(12) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(12) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value> BIT(12) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DROP TABLE type_conversions; DROP TABLE type_conversions;
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* error.* 1677");
DROP TABLE t1; DROP TABLE t1;
set global slave_type_conversions = @saved_slave_type_conversions; set global slave_type_conversions = @saved_slave_type_conversions;
include/rpl_end.inc include/rpl_end.inc

View File

@ -86,7 +86,7 @@ INSERT INTO t1(b,c) VALUES('B',2);
# Wait while C will stop. # Wait while C will stop.
--connection server_3 --connection server_3
# 1062 = ER_DUP_ENTRY # 1062 = ER_DUP_ENTRY
call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* error.* 1062");
--let $slave_sql_errno= 1062 --let $slave_sql_errno= 1062
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
--connection server_1 --connection server_1

View File

@ -24,7 +24,7 @@ call mtr.add_suppression('Slave I/O: Relay log write failure: could not queue ev
call mtr.add_suppression('event read from binlog did not pass crc check'); call mtr.add_suppression('event read from binlog did not pass crc check');
call mtr.add_suppression('Replication event checksum verification failed'); call mtr.add_suppression('Replication event checksum verification failed');
call mtr.add_suppression('Event crc check failed! Most likely there is event corruption'); call mtr.add_suppression('Event crc check failed! Most likely there is event corruption');
call mtr.add_suppression('Slave SQL: Error initializing relay log position: I/O error reading event at position .*, Error_code: 1593'); call mtr.add_suppression('Slave SQL: Error initializing relay log position: I/O error reading event at position .*, error.* 1593');
SET @old_master_verify_checksum = @@master_verify_checksum; SET @old_master_verify_checksum = @@master_verify_checksum;

View File

@ -112,7 +112,7 @@ show grants for rpl_do_grant2@localhost;
# BUG42217 mysql.procs_priv does not get replicated # BUG42217 mysql.procs_priv does not get replicated
##################################################### #####################################################
connection master; connection master;
call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' error.* 1396");
sync_slave_with_master; sync_slave_with_master;
connection master; connection master;

View File

@ -128,7 +128,7 @@ UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id
# and stop slave sql thread. # and stop slave sql thread.
sync_slave_with_master; sync_slave_with_master;
connection slave; connection slave;
call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* Error_code: 1146"); call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* error.* 1146");
connection master; connection master;
# Parameters for include/wait_for_slave_sql_error_and_skip.inc: # Parameters for include/wait_for_slave_sql_error_and_skip.inc:

View File

@ -123,7 +123,7 @@ UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id
# and stop slave sql thread. # and stop slave sql thread.
sync_slave_with_master; sync_slave_with_master;
connection slave; connection slave;
call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* Error_code: 1146"); call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* error.* 1146");
connection master; connection master;
# Parameters for include/wait_for_slave_sql_error_and_skip.inc: # Parameters for include/wait_for_slave_sql_error_and_skip.inc:

View File

@ -0,0 +1,18 @@
!include ../my.cnf
[mysqld.1]
log-slave-updates
loose-innodb
[mysqld.2]
log-slave-updates
loose-innodb
[mysqld.3]
log-slave-updates
loose-innodb
[ENV]
SERVER_MYPORT_3= @mysqld.3.port
SERVER_MYSOCK_3= @mysqld.3.socket

View File

@ -0,0 +1,71 @@
--source include/have_innodb.inc
--source include/have_binlog_format_mixed.inc
--let $rpl_topology=1->2,1->3
--source include/rpl_init.inc
connection server_1;
create table t1 (n int);
insert into t1 values (1);
insert into t1 values (2);
save_master_pos;
connection server_3;
sync_with_master;
source include/stop_slave.inc;
source include/wait_for_slave_to_stop.inc;
connection server_2;
sync_with_master;
source include/stop_slave.inc;
source include/wait_for_slave_to_stop.inc;
reset slave all;
connection server_1;
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
master_user='root', MASTER_USE_GTID=1;
source include/start_slave.inc;
source include/wait_for_slave_to_start.inc;
connection server_2;
flush logs;
insert into t1 values (3);
insert into t1 values (4);
flush logs;
save_master_pos;
connection server_3;
--replace_result $SERVER_MYPORT_2 SERVER_MYPORT_2
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_2,
MASTER_USE_GTID=1;
source include/start_slave.inc;
sync_with_master;
select * from t1 order by n;
source include/show_binary_logs.inc;
let $binlog_file=LAST;
source include/show_binlog_events.inc;
connection server_1;
source include/stop_slave.inc;
source include/wait_for_slave_to_stop.inc;
reset slave all;
connection server_2;
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_1,
master_user = 'root', MASTER_USE_GTID=1;
source include/start_slave.inc;
connection server_3;
source include/stop_slave.inc;
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $SERVER_MYPORT_1,
MASTER_USE_GTID=1;
source include/start_slave.inc;
connection server_1;
drop table t1;
--source include/rpl_end.inc

View File

@ -208,7 +208,7 @@ INSERT INTO t1 VALUES(3);
--source include/wait_condition.inc --source include/wait_condition.inc
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
SET SQL_LOG_BIN=0; SET SQL_LOG_BIN=0;
call mtr.add_suppression("Slave: Table 't1' already exists Error_code: 1050"); call mtr.add_suppression("Slave: Table 't1' already exists error.* 1050");
SET SQL_LOG_BIN=1; SET SQL_LOG_BIN=1;

View File

@ -319,7 +319,7 @@ INSERT INTO t1 VALUES (1, 'on slave', NULL);
--connection master --connection master
INSERT INTO t1 VALUES (1, 'on master', NULL); INSERT INTO t1 VALUES (1, 'on master', NULL);
--connection slave --connection slave
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* error.* 1062");
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");
let $slave_errno= ER_DUP_ENTRY let $slave_errno= ER_DUP_ENTRY
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc

View File

@ -4,10 +4,10 @@
source include/master-slave.inc; source include/master-slave.inc;
# Add suppression for expected warning(s) in slaves error log # Add suppression for expected warning(s) in slaves error log
call mtr.add_suppression("Slave SQL.*Can.t find record in .t[12].* Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Can.t find record in .t[12].* error.* 1032");
call mtr.add_suppression("Slave SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Slave SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* error.* 1451");
call mtr.add_suppression("Slave SQL.*Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); call mtr.add_suppression("Slave SQL.*Cannot add or update a child row: a foreign key constraint fails .* error.* 1452");
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* error.* 1062");
connection master; connection master;
CREATE TABLE t1 (a INT PRIMARY KEY); CREATE TABLE t1 (a INT PRIMARY KEY);

View File

@ -131,7 +131,7 @@ show grants for mysqltest4@localhost;
# where mysqltest1 does not exist on slave, # where mysqltest1 does not exist on slave,
# to succeed on slave the mode is temporarily changed # to succeed on slave the mode is temporarily changed
set global slave_exec_mode='IDEMPOTENT'; set global slave_exec_mode='IDEMPOTENT';
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* error.* 1032");
connection master; connection master;
drop table t1, mysqltest2.t2; drop table t1, mysqltest2.t2;

View File

@ -15,7 +15,7 @@ connection master;
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
connection slave; connection slave;
call mtr.add_suppression("Slave SQL.*Fatal error: Not enough memory, Error_code: 1593"); call mtr.add_suppression("Slave SQL.*Fatal error: Not enough memory, error.* 1593");
let $slave_sql_errno= 1593; let $slave_sql_errno= 1593;
let $show_slave_sql_error= 1; let $show_slave_sql_error= 1;
source include/wait_for_slave_sql_error_and_skip.inc; source include/wait_for_slave_sql_error_and_skip.inc;

View File

@ -11,7 +11,7 @@
# max-out size db name # max-out size db name
source include/master-slave.inc; source include/master-slave.inc;
source include/have_binlog_format_row.inc; source include/have_binlog_format_row.inc;
call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, Error_code: 1153"); call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153");
call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet"); call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet");
let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
disable_warnings; disable_warnings;

View File

@ -95,7 +95,7 @@ set insert_id=1234;
insert into t2 values(NULL); insert into t2 values(NULL);
connection slave; connection slave;
# 1062 = ER_DUP_ENTRY # 1062 = ER_DUP_ENTRY
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* error.* 1062");
--let $slave_sql_errno= 1062 --let $slave_sql_errno= 1062
--source include/wait_for_slave_sql_error_and_skip.inc --source include/wait_for_slave_sql_error_and_skip.inc

View File

@ -68,7 +68,7 @@ DROP TABLE t1;
--echo **** On Slave **** --echo **** On Slave ****
connection slave; connection slave;
SET GLOBAL QUERY_CACHE_SIZE=0; SET GLOBAL QUERY_CACHE_SIZE=0;
call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1.* Error_code: 1032"); call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1.* error.* 1032");
--echo **** On Master **** --echo **** On Master ****
connection master; connection master;

View File

@ -161,8 +161,8 @@ let $test_insert = INSERT INTO t1 VALUES ('This is a test.');
source include/test_fieldsize.inc; source include/test_fieldsize.inc;
connection slave; connection slave;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 0 ...e mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 0 ...e mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* error.* 1677");
--echo *** Cleanup *** --echo *** Cleanup ***
connection master; connection master;

View File

@ -8,7 +8,7 @@ source include/have_binlog_format_row.inc;
source include/master-slave.inc; source include/master-slave.inc;
connection slave; connection slave;
call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: .*"); call mtr.add_suppression("Slave: Can\'t find record in \'t1\' error.* .*");
call mtr.add_suppression("Can't find record in 't.'"); call mtr.add_suppression("Can't find record in 't.'");
--echo [on slave] --echo [on slave]

View File

@ -9,10 +9,10 @@ connection slave;
source include/have_innodb.inc; source include/have_innodb.inc;
# Add suppression for expected warning(s) in slaves error log # Add suppression for expected warning(s) in slaves error log
call mtr.add_suppression("Can.t find record in .t[12].* Error_code: 1032"); call mtr.add_suppression("Can.t find record in .t[12].* error.* 1032");
call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* error.* 1451");
call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* error.* 1452");
call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* Error_code: 1062"); call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* error.* 1062");
# bug#31609 Not all RBR slave errors reported as errors # bug#31609 Not all RBR slave errors reported as errors
# bug#31552 Replication breaks when deleting rows from out-of-sync table # bug#31552 Replication breaks when deleting rows from out-of-sync table

View File

@ -30,7 +30,7 @@ INSERT INTO t1 VALUES (1);
connection slave; connection slave;
# slave should have stopped because can't find table t1 # slave should have stopped because can't find table t1
# 1146 = ER_NO_SUCH_TABLE # 1146 = ER_NO_SUCH_TABLE
call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t1. doesn.t exist., Error_code: 1146"); call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t1. doesn.t exist., error.* 1146");
--let $slave_sql_errno= 1146 --let $slave_sql_errno= 1146
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc

View File

@ -102,7 +102,7 @@ SET SQL_LOG_BIN=1;
connection slave; connection slave;
call mtr.add_suppression("Slave SQL.*Could not execute .*te_rows event on table test.t.; Duplicate entry.* Error_code: 1062"); call mtr.add_suppression("Slave SQL.*Could not execute .*te_rows event on table test.t.; Duplicate entry.* error.* 1062");
CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB; CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;

View File

@ -63,7 +63,7 @@ SELECT * FROM t3 ORDER BY a;
--connection slave --connection slave
# 1146 = ER_NO_SUCH_TABLE # 1146 = ER_NO_SUCH_TABLE
call mtr.add_suppression("Slave SQL.*Table .test.t3. doesn.t exist.* Error_code: 1146"); call mtr.add_suppression("Slave SQL.*Table .test.t3. doesn.t exist.* error.* 1146");
--let $slave_sql_errno= 1146 --let $slave_sql_errno= 1146
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
SHOW TABLES LIKE 't%'; SHOW TABLES LIKE 't%';

View File

@ -69,9 +69,9 @@ RESET SLAVE;
drop table t1; drop table t1;
call mtr.add_suppression("Slave: Can't get stat of .*"); call mtr.add_suppression("Slave: Can't get stat of .*");
call mtr.add_suppression("Slave SQL: Error .Can.t get stat of.* Error_code: 13"); call mtr.add_suppression("Slave SQL: Error .Can.t get stat of.* error.* 13");
call mtr.add_suppression("Slave: File.* not found.*"); call mtr.add_suppression("Slave: File.* not found.*");
call mtr.add_suppression("Slave SQL: Error .File.* not found.* Error_code: 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
eval SET @@global.debug_dbug= '$old_debug'; eval SET @@global.debug_dbug= '$old_debug';

View File

@ -10,8 +10,8 @@
--connection slave --connection slave
START SLAVE; START SLAVE;
# Why 12??? call mtr.add_suppression("Slave SQL.*Unable to use slave.s temporary directory");
call mtr.add_suppression("Slave SQL.*Unable to use slave.s temporary directory.* Error_code: 12"); # 12 = EE_CANT_MKDIR
--let $slave_sql_errno= 12 --let $slave_sql_errno= 12
source include/wait_for_slave_sql_error.inc; source include/wait_for_slave_sql_error.inc;

View File

@ -61,7 +61,7 @@ SELECT RPAD(Source, 15, ' ') AS Source_Type,
enable_query_log; enable_query_log;
DROP TABLE type_conversions; DROP TABLE type_conversions;
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* error.* 1677");
connection master; connection master;
DROP TABLE t1; DROP TABLE t1;

View File

@ -557,7 +557,7 @@ let $cleanup_stmt= ;
--source include/check_ftwrl_compatible.inc --source include/check_ftwrl_compatible.inc
deallocate prepare stmt1; deallocate prepare stmt1;
call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., Error_code: 1223"); call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., error.* 1223");
--echo # --echo #
--echo # 9.2.b) EXECUTE for statement which is incompatible with FTWRL --echo # 9.2.b) EXECUTE for statement which is incompatible with FTWRL

View File

@ -47,6 +47,7 @@
#include "transaction.h" #include "transaction.h"
#include <my_dir.h> #include <my_dir.h>
#include "sql_show.h" // append_identifier #include "sql_show.h" // append_identifier
#include <strfunc.h>
#endif /* MYSQL_CLIENT */ #endif /* MYSQL_CLIENT */
@ -518,11 +519,59 @@ pretty_print_str(String *packet, const char *str, int len)
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) #if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
/** /**
Creates a temporary name for load data infile:. Create a prefix for the temporary files that is to be used for
load data file name for this master
@param name Store prefix of name here
@param connection_name Connection name
@return pointer to end of name
@description
We assume that FN_REFLEN is big enough to hold
MAX_CONNECTION_NAME * MAX_FILENAME_MBWIDTH characters + 2 numbers +
a short extension.
The resulting file name has the following parts, each separated with a '-'
- PREFIX_SQL_LOAD (SQL_LOAD-)
- If a connection name is given (multi-master setup):
- Add an extra '-' to mark that this is a multi-master file
- connection name in lower case, converted to safe file characters.
(see create_logfile_name_with_suffix()).
- server_id
- A last '-' (after server_id).
*/
static char *load_data_tmp_prefix(char *name,
LEX_STRING *connection_name)
{
name= strmov(name, PREFIX_SQL_LOAD);
if (connection_name->length)
{
uint buf_length;
uint errors;
/* Add marker that this is a multi-master-file */
*name++='-';
/* Convert connection_name to a safe filename */
buf_length= strconvert(system_charset_info, connection_name->str,
&my_charset_filename, name, FN_REFLEN,
&errors);
name+= buf_length;
*name++= '-';
}
name= int10_to_str(global_system_variables.server_id, name, 10);
*name++ = '-';
*name= '\0'; // For testing prefixes
return name;
}
/**
Creates a temporary name for LOAD DATA INFILE
@param buf Store new filename here @param buf Store new filename here
@param file_id File_id (part of file name) @param file_id File_id (part of file name)
@param event_server_id Event_id (part of file name) @param event_server_id Event_id (part of file name)
@param ext Extension for file name @param ext Extension for file name
@return @return
@ -530,16 +579,14 @@ pretty_print_str(String *packet, const char *str, int len)
*/ */
static char *slave_load_file_stem(char *buf, uint file_id, static char *slave_load_file_stem(char *buf, uint file_id,
int event_server_id, const char *ext) int event_server_id, const char *ext,
LEX_STRING *connection_name)
{ {
char *res; char *res;
fn_format(buf,PREFIX_SQL_LOAD,slave_load_tmpdir, "", MY_UNPACK_FILENAME); res= buf+ unpack_dirname(buf, slave_load_tmpdir);
to_unix_path(buf); to_unix_path(buf);
buf= load_data_tmp_prefix(res, connection_name);
buf = strend(buf); buf= int10_to_str(event_server_id, buf, 10);
buf = int10_to_str(global_system_variables.server_id, buf, 10);
*buf++ = '-';
buf = int10_to_str(event_server_id, buf, 10);
*buf++ = '-'; *buf++ = '-';
res= int10_to_str(file_id, buf, 10); res= int10_to_str(file_id, buf, 10);
strmov(res, ext); // Add extension last strmov(res, ext); // Add extension last
@ -554,14 +601,17 @@ static char *slave_load_file_stem(char *buf, uint file_id,
Delete all temporary files used for SQL_LOAD. Delete all temporary files used for SQL_LOAD.
*/ */
static void cleanup_load_tmpdir() static void cleanup_load_tmpdir(LEX_STRING *connection_name)
{ {
MY_DIR *dirp; MY_DIR *dirp;
FILEINFO *file; FILEINFO *file;
uint i; uint i;
char fname[FN_REFLEN], prefbuf[31], *p; char dir[FN_REFLEN], fname[FN_REFLEN];
char prefbuf[31 + MAX_CONNECTION_NAME* MAX_FILENAME_MBWIDTH + 1];
DBUG_ENTER("cleanup_load_tmpdir");
if (!(dirp=my_dir(slave_load_tmpdir,MYF(0)))) unpack_dirname(dir, slave_load_tmpdir);
if (!(dirp=my_dir(dir, MYF(MY_WME))))
return; return;
/* /*
@ -572,10 +622,9 @@ static void cleanup_load_tmpdir()
we cannot meet Start_log event in the middle of events from one we cannot meet Start_log event in the middle of events from one
LOAD DATA. LOAD DATA.
*/ */
p= strmake(prefbuf, STRING_WITH_LEN(PREFIX_SQL_LOAD));
p= int10_to_str(global_system_variables.server_id, p, 10); load_data_tmp_prefix(prefbuf, connection_name);
*(p++)= '-'; DBUG_PRINT("enter", ("dir: '%s' prefix: '%s'", dir, prefbuf));
*p= 0;
for (i=0 ; i < (uint)dirp->number_of_files; i++) for (i=0 ; i < (uint)dirp->number_of_files; i++)
{ {
@ -588,6 +637,7 @@ static void cleanup_load_tmpdir()
} }
my_dirend(dirp); my_dirend(dirp);
DBUG_VOID_RETURN;
} }
#endif #endif
@ -4417,7 +4467,11 @@ int Start_log_event_v3::do_apply_event(Relay_log_info const *rli)
if (created) if (created)
{ {
error= close_temporary_tables(thd); error= close_temporary_tables(thd);
cleanup_load_tmpdir(); /*
The following is only false if we get here with a BINLOG statement
*/
if (rli->mi)
cleanup_load_tmpdir(&rli->mi->cmp_connection_name);
} }
else else
{ {
@ -7784,7 +7838,8 @@ int Create_file_log_event::do_apply_event(Relay_log_info const *rli)
THD_STAGE_INFO(thd, stage_making_temp_file_create_before_load_data); THD_STAGE_INFO(thd, stage_making_temp_file_create_before_load_data);
bzero((char*)&file, sizeof(file)); bzero((char*)&file, sizeof(file));
ext= slave_load_file_stem(fname_buf, file_id, server_id, ".info"); ext= slave_load_file_stem(fname_buf, file_id, server_id, ".info",
&rli->mi->connection_name);
/* old copy may exist already */ /* old copy may exist already */
mysql_file_delete(key_file_log_event_info, fname_buf, MYF(0)); mysql_file_delete(key_file_log_event_info, fname_buf, MYF(0));
if ((fd= mysql_file_create(key_file_log_event_info, if ((fd= mysql_file_create(key_file_log_event_info,
@ -7960,7 +8015,8 @@ int Append_block_log_event::do_apply_event(Relay_log_info const *rli)
DBUG_ENTER("Append_block_log_event::do_apply_event"); DBUG_ENTER("Append_block_log_event::do_apply_event");
THD_STAGE_INFO(thd, stage_making_temp_file_append_before_load_data); THD_STAGE_INFO(thd, stage_making_temp_file_append_before_load_data);
slave_load_file_stem(fname, file_id, server_id, ".data"); slave_load_file_stem(fname, file_id, server_id, ".data",
&rli->mi->cmp_connection_name);
if (get_create_or_append()) if (get_create_or_append())
{ {
/* /*
@ -8102,7 +8158,8 @@ void Delete_file_log_event::pack_info(THD *thd, Protocol *protocol)
int Delete_file_log_event::do_apply_event(Relay_log_info const *rli) int Delete_file_log_event::do_apply_event(Relay_log_info const *rli)
{ {
char fname[FN_REFLEN+10]; char fname[FN_REFLEN+10];
char *ext= slave_load_file_stem(fname, file_id, server_id, ".data"); char *ext= slave_load_file_stem(fname, file_id, server_id, ".data",
&rli->mi->cmp_connection_name);
mysql_file_delete(key_file_log_event_data, fname, MYF(MY_WME)); mysql_file_delete(key_file_log_event_data, fname, MYF(MY_WME));
strmov(ext, ".info"); strmov(ext, ".info");
mysql_file_delete(key_file_log_event_info, fname, MYF(MY_WME)); mysql_file_delete(key_file_log_event_info, fname, MYF(MY_WME));
@ -8206,7 +8263,8 @@ int Execute_load_log_event::do_apply_event(Relay_log_info const *rli)
IO_CACHE file; IO_CACHE file;
Load_log_event *lev= 0; Load_log_event *lev= 0;
ext= slave_load_file_stem(fname, file_id, server_id, ".info"); ext= slave_load_file_stem(fname, file_id, server_id, ".info",
&rli->mi->cmp_connection_name);
if ((fd= mysql_file_open(key_file_log_event_info, if ((fd= mysql_file_open(key_file_log_event_info,
fname, O_RDONLY | O_BINARY | O_NOFOLLOW, fname, O_RDONLY | O_BINARY | O_NOFOLLOW,
MYF(MY_WME))) < 0 || MYF(MY_WME))) < 0 ||
@ -8493,7 +8551,8 @@ Execute_load_query_log_event::do_apply_event(Relay_log_info const *rli)
memcpy(p, query, fn_pos_start); memcpy(p, query, fn_pos_start);
p+= fn_pos_start; p+= fn_pos_start;
fname= (p= strmake(p, STRING_WITH_LEN(" INFILE \'"))); fname= (p= strmake(p, STRING_WITH_LEN(" INFILE \'")));
p= slave_load_file_stem(p, file_id, server_id, ".data"); p= slave_load_file_stem(p, file_id, server_id, ".data",
&rli->mi->cmp_connection_name);
fname_end= p= strend(p); // Safer than p=p+5 fname_end= p= strend(p); // Safer than p=p+5
*(p++)='\''; *(p++)='\'';
switch (dup_handling) { switch (dup_handling) {

View File

@ -723,10 +723,11 @@ bool check_master_connection_name(LEX_STRING *name)
*/ */
void create_logfile_name_with_suffix(char *res_file_name, size_t length, void create_logfile_name_with_suffix(char *res_file_name, size_t length,
const char *info_file, bool append, const char *info_file, bool append,
LEX_STRING *suffix) LEX_STRING *suffix)
{ {
char buff[MAX_CONNECTION_NAME+1], res[MAX_CONNECTION_NAME+1], *p; char buff[MAX_CONNECTION_NAME+1],
res[MAX_CONNECTION_NAME * MAX_FILENAME_MBWIDTH+1], *p;
p= strmake(res_file_name, info_file, length); p= strmake(res_file_name, info_file, length);
/* If not empty suffix and there is place left for some part of the suffix */ /* If not empty suffix and there is place left for some part of the suffix */
@ -739,8 +740,6 @@ void create_logfile_name_with_suffix(char *res_file_name, size_t length,
/* Create null terminated string */ /* Create null terminated string */
strmake(buff, suffix->str, suffix->length); strmake(buff, suffix->str, suffix->length);
/* Convert to lower case */
my_casedn_str(system_charset_info, buff);
/* Convert to characters usable in a file name */ /* Convert to characters usable in a file name */
res_length= strconvert(system_charset_info, buff, res_length= strconvert(system_charset_info, buff,
&my_charset_filename, res, sizeof(res), &errors); &my_charset_filename, res, sizeof(res), &errors);
@ -856,7 +855,7 @@ bool Master_info_index::init_all_master_info()
{ {
int thread_mask; int thread_mask;
int err_num= 0, succ_num= 0; // The number of success read Master_info int err_num= 0, succ_num= 0; // The number of success read Master_info
char sign[MAX_CONNECTION_NAME]; char sign[MAX_CONNECTION_NAME+1];
File index_file_nr; File index_file_nr;
DBUG_ENTER("init_all_master_info"); DBUG_ENTER("init_all_master_info");
@ -908,11 +907,14 @@ bool Master_info_index::init_all_master_info()
lock_slave_threads(mi); lock_slave_threads(mi);
init_thread_mask(&thread_mask,mi,0 /*not inverse*/); init_thread_mask(&thread_mask,mi,0 /*not inverse*/);
create_logfile_name_with_suffix(buf_master_info_file, sizeof(buf_master_info_file), create_logfile_name_with_suffix(buf_master_info_file,
master_info_file, 0, &connection_name); sizeof(buf_master_info_file),
master_info_file, 0,
&mi->cmp_connection_name);
create_logfile_name_with_suffix(buf_relay_log_info_file, create_logfile_name_with_suffix(buf_relay_log_info_file,
sizeof(buf_relay_log_info_file), sizeof(buf_relay_log_info_file),
relay_log_info_file, 0, &connection_name); relay_log_info_file, 0,
&mi->cmp_connection_name);
if (global_system_variables.log_warnings > 1) if (global_system_variables.log_warnings > 1)
sql_print_information("Reading Master_info: '%s' Relay_info:'%s'", sql_print_information("Reading Master_info: '%s' Relay_info:'%s'",
buf_master_info_file, buf_relay_log_info_file); buf_master_info_file, buf_relay_log_info_file);

View File

@ -67,7 +67,7 @@ Slave_reporting_capability::report(loglevel level, int err_code,
va_end(args); va_end(args);
/* If the msg string ends with '.', do not add a ',' it would be ugly */ /* If the msg string ends with '.', do not add a ',' it would be ugly */
report_function("Slave %s: %s%s Error_code: %d", report_function("Slave %s: %s%s Internal MariaDB error code: %d",
m_thread_name, pbuff, m_thread_name, pbuff,
(pbuff[0] && *(strend(pbuff)-1) == '.') ? "" : ",", (pbuff[0] && *(strend(pbuff)-1) == '.') ? "" : ",",
err_code); err_code);

View File

@ -214,17 +214,18 @@ a file name for --relay-log-index option", opt_relaylog_index_name);
char buf_relay_logname[FN_REFLEN], buf_relaylog_index_name_buff[FN_REFLEN]; char buf_relay_logname[FN_REFLEN], buf_relaylog_index_name_buff[FN_REFLEN];
char *buf_relaylog_index_name= opt_relaylog_index_name; char *buf_relaylog_index_name= opt_relaylog_index_name;
create_logfile_name_with_suffix(buf_relay_logname, sizeof(buf_relay_logname), create_logfile_name_with_suffix(buf_relay_logname,
ln, 1, &mi->connection_name); sizeof(buf_relay_logname),
ln, 1, &mi->cmp_connection_name);
ln= buf_relay_logname; ln= buf_relay_logname;
if (opt_relaylog_index_name) if (opt_relaylog_index_name)
{ {
buf_relaylog_index_name= buf_relaylog_index_name_buff; buf_relaylog_index_name= buf_relaylog_index_name_buff;
create_logfile_name_with_suffix(buf_relaylog_index_name_buff, create_logfile_name_with_suffix(buf_relaylog_index_name_buff,
sizeof(buf_relaylog_index_name_buff), sizeof(buf_relaylog_index_name_buff),
opt_relaylog_index_name, 0, opt_relaylog_index_name, 0,
&mi->connection_name); &mi->cmp_connection_name);
} }
/* /*

View File

@ -3734,7 +3734,6 @@ int check_temp_dir(char* tmp_file)
MY_DIR *dirp; MY_DIR *dirp;
char tmp_dir[FN_REFLEN]; char tmp_dir[FN_REFLEN];
size_t tmp_dir_size; size_t tmp_dir_size;
DBUG_ENTER("check_temp_dir"); DBUG_ENTER("check_temp_dir");
mysql_mutex_lock(&LOCK_thread_count); mysql_mutex_lock(&LOCK_thread_count);

View File

@ -41,6 +41,7 @@
#define MAX_CONNECTION_NAME NAME_LEN #define MAX_CONNECTION_NAME NAME_LEN
#define MAX_MBWIDTH 3 /* Max multibyte sequence */ #define MAX_MBWIDTH 3 /* Max multibyte sequence */
#define MAX_FILENAME_MBWIDTH 5
#define MAX_FIELD_CHARLENGTH 255 #define MAX_FIELD_CHARLENGTH 255
#define MAX_FIELD_VARCHARLENGTH 65535 #define MAX_FIELD_VARCHARLENGTH 65535
#define MAX_FIELD_BLOBLENGTH UINT_MAX32 /* cf field_blob::get_length() */ #define MAX_FIELD_BLOBLENGTH UINT_MAX32 /* cf field_blob::get_length() */

View File

@ -703,7 +703,12 @@ get_gtid_list_event(IO_CACHE *cache, Gtid_list_log_event **out_gtid_list)
to build an in-memory hash or stuff like that. to build an in-memory hash or stuff like that.
We need to check that slave did not request GTID D-S-N1, when the We need to check that slave did not request GTID D-S-N1, when the
Gtid_list_log_event for this binlog file has D-S-N2 with N2 > N1. Gtid_list_log_event for this binlog file has D-S-N2 with N2 >= N1.
(Because this means that requested GTID is in an earlier binlog).
However, if the Gtid_list_log_event indicates that D-S-N1 is the very last
GTID for domain D in prior binlog files, then it is ok to start from the
very start of this binlog file. This special case is important, as it
allows to purge old logs even if some domain is unused for long.
In addition, we need to check that we do not have a GTID D-S-N3 in the In addition, we need to check that we do not have a GTID D-S-N3 in the
Gtid_list_log_event where D is not present in the requested slave state at Gtid_list_log_event where D is not present in the requested slave state at
@ -717,7 +722,8 @@ contains_all_slave_gtid(slave_connection_state *st, Gtid_list_log_event *glev)
for (i= 0; i < glev->count; ++i) for (i= 0; i < glev->count; ++i)
{ {
const rpl_gtid *gtid= st->find(glev->list[i].domain_id); uint32 gl_domain_id= glev->list[i].domain_id;
const rpl_gtid *gtid= st->find(gl_domain_id);
if (!gtid) if (!gtid)
{ {
/* /*
@ -727,13 +733,28 @@ contains_all_slave_gtid(slave_connection_state *st, Gtid_list_log_event *glev)
return false; return false;
} }
if (gtid->server_id == glev->list[i].server_id && if (gtid->server_id == glev->list[i].server_id &&
gtid->seq_no < glev->list[i].seq_no) gtid->seq_no <= glev->list[i].seq_no)
{ {
/* /*
The slave needs to receive gtid, but it is contained in an earlier The slave needs to start after gtid, but it is contained in an earlier
binlog file. So we need to search back further. binlog file. So we need to search back further, unless it was the very
last gtid logged for the domain in earlier binlog files.
*/ */
return false; if (gtid->seq_no < glev->list[i].seq_no)
return false;
/*
The slave requested D-S-N1, which happens to be the last GTID logged
in prior binlog files with same domain id D and server id S.
The Gtid_list is kept sorted on domain_id, with the last GTID in each
domain_id group being the last one logged. So if this is the last GTID
within the domain_id group, then it is ok to start from the very
beginning of this group, per the special case explained in comment at
the start of this function. If not, then we need to search back further.
*/
if (i+1 < glev->count && gl_domain_id == glev->list[i+1].domain_id)
return false;
} }
} }
@ -997,7 +1018,15 @@ gtid_find_binlog_file(slave_connection_state *state, char *out_name)
const rpl_gtid *gtid= state->find(glev->list[i].domain_id); const rpl_gtid *gtid= state->find(glev->list[i].domain_id);
if (!gtid) if (!gtid)
{ {
/* contains_all_slave_gtid() would have returned false if so. */ /*
contains_all_slave_gtid() returns false if there is any domain in
Gtid_list_event which is not in the requested slave position.
We may delete a domain from the slave state inside this loop, but
we only do this when it is the very last GTID logged for that
domain in earlier binlogs, and then we can not encounter it in any
further GTIDs in the Gtid_list.
*/
DBUG_ASSERT(0); DBUG_ASSERT(0);
continue; continue;
} }
@ -2128,11 +2157,12 @@ int start_slave(THD* thd , Master_info* mi, bool net_report)
create_logfile_name_with_suffix(master_info_file_tmp, create_logfile_name_with_suffix(master_info_file_tmp,
sizeof(master_info_file_tmp), sizeof(master_info_file_tmp),
master_info_file, 0, &mi->connection_name); master_info_file, 0,
&mi->cmp_connection_name);
create_logfile_name_with_suffix(relay_log_info_file_tmp, create_logfile_name_with_suffix(relay_log_info_file_tmp,
sizeof(relay_log_info_file_tmp), sizeof(relay_log_info_file_tmp),
relay_log_info_file, 0, relay_log_info_file, 0,
&mi->connection_name); &mi->cmp_connection_name);
lock_slave_threads(mi); // this allows us to cleanly read slave_running lock_slave_threads(mi); // this allows us to cleanly read slave_running
// Get a mask of _stopped_ threads // Get a mask of _stopped_ threads
@ -2377,11 +2407,13 @@ int reset_slave(THD *thd, Master_info* mi)
// and delete these two files // and delete these two files
create_logfile_name_with_suffix(master_info_file_tmp, create_logfile_name_with_suffix(master_info_file_tmp,
sizeof(master_info_file_tmp), sizeof(master_info_file_tmp),
master_info_file, 0, &mi->connection_name); master_info_file, 0,
&mi->cmp_connection_name);
create_logfile_name_with_suffix(relay_log_info_file_tmp, create_logfile_name_with_suffix(relay_log_info_file_tmp,
sizeof(relay_log_info_file_tmp), sizeof(relay_log_info_file_tmp),
relay_log_info_file, 0, &mi->connection_name); relay_log_info_file, 0,
&mi->cmp_connection_name);
fn_format(fname, master_info_file_tmp, mysql_data_home, "", 4+32); fn_format(fname, master_info_file_tmp, mysql_data_home, "", 4+32);
if (mysql_file_stat(key_file_master_info, fname, &stat_area, MYF(0)) && if (mysql_file_stat(key_file_master_info, fname, &stat_area, MYF(0)) &&
@ -2548,11 +2580,13 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
THD_STAGE_INFO(thd, stage_changing_master); THD_STAGE_INFO(thd, stage_changing_master);
create_logfile_name_with_suffix(master_info_file_tmp, create_logfile_name_with_suffix(master_info_file_tmp,
sizeof(master_info_file_tmp), sizeof(master_info_file_tmp),
master_info_file, 0, &mi->connection_name); master_info_file, 0,
&mi->cmp_connection_name);
create_logfile_name_with_suffix(relay_log_info_file_tmp, create_logfile_name_with_suffix(relay_log_info_file_tmp,
sizeof(relay_log_info_file_tmp), sizeof(relay_log_info_file_tmp),
relay_log_info_file, 0, &mi->connection_name); relay_log_info_file, 0,
&mi->cmp_connection_name);
/* if new Master_info doesn't exists, add it */ /* if new Master_info doesn't exists, add it */
if (!master_info_index->get_master_info(&mi->connection_name, if (!master_info_index->get_master_info(&mi->connection_name,