mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Currently, rpl_semi_sync is failing in PB due to the warning message: "Slave SQL: slave SQL thread is being stopped in the middle of " "applying of a group having updated a non-transaction table; " "waiting for the group completion ..." The problem started happening after the fix for BUG#11762407 what was automatically suppressing some warning messages. To fix the current issue, we suppress the aforementioned warning message and exploit the opportunity to make the sentence clearer.
69 lines
3.6 KiB
Plaintext
69 lines
3.6 KiB
Plaintext
include/master-slave.inc
|
|
[connection master]
|
|
SET @@session.binlog_direct_non_transactional_updates= FALSE;
|
|
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
|
create table tm (a int auto_increment primary key) engine=myisam;
|
|
create table ti (a int auto_increment primary key) engine=innodb;
|
|
set @@global.debug="+d,stop_slave_middle_group";
|
|
begin;
|
|
insert into ti set a=null;
|
|
insert into tm set a=null;
|
|
Warnings:
|
|
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
|
|
commit;
|
|
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.*Slave SQL Thread stopped with incomplete event group having non-transactional changes");
|
|
include/wait_for_slave_sql_to_stop.inc
|
|
SELECT "NO" AS Last_SQL_Error, @check as `true`;
|
|
Last_SQL_Error true
|
|
NO 1
|
|
select count(*) as one from tm;
|
|
one
|
|
1
|
|
select count(*) as one from ti;
|
|
one
|
|
1
|
|
set @@global.debug="-d";
|
|
include/start_slave.inc
|
|
truncate table tm;
|
|
truncate table ti;
|
|
set @@global.debug="+d,stop_slave_middle_group";
|
|
set @@global.debug="+d,incomplete_group_in_relay_log";
|
|
begin;
|
|
insert into ti set a=null;
|
|
insert into tm set a=null;
|
|
Warnings:
|
|
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
|
|
commit;
|
|
include/wait_for_slave_sql_to_stop.inc
|
|
SELECT "Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`;
|
|
Last_SQL_Error true
|
|
Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1
|
|
select count(*) as one from tm;
|
|
one
|
|
1
|
|
select count(*) as zero from ti;
|
|
zero
|
|
0
|
|
set @@global.debug="-d";
|
|
stop slave;
|
|
truncate table tm;
|
|
include/start_slave.inc
|
|
set @@global.debug="+d,stop_slave_middle_group";
|
|
set @@global.debug="+d,incomplete_group_in_relay_log";
|
|
update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2;
|
|
include/wait_for_slave_sql_to_stop.inc
|
|
SELECT "Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`;
|
|
Last_SQL_Error true
|
|
Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1
|
|
select max(a) as two from tm;
|
|
two
|
|
2
|
|
select max(a) as one from ti;
|
|
one
|
|
1
|
|
set @@global.debug="-d";
|
|
include/rpl_reset.inc
|
|
drop table tm, ti;
|
|
include/rpl_end.inc
|