mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +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.
76 lines
2.7 KiB
Plaintext
76 lines
2.7 KiB
Plaintext
include/master-slave.inc
|
|
[connection master]
|
|
SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit;
|
|
SET @@global.innodb_flush_log_at_trx_commit= 0;
|
|
SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit;
|
|
SET @@global.innodb_flush_log_at_trx_commit= 0;
|
|
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");
|
|
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
|
create table t1(n int);
|
|
stop slave;
|
|
include/wait_for_slave_to_stop.inc
|
|
start slave;
|
|
stop slave io_thread;
|
|
start slave io_thread;
|
|
include/wait_for_slave_to_start.inc
|
|
drop table t1;
|
|
create table t1i(n int primary key) engine=innodb;
|
|
create table t2m(n int primary key) engine=myisam;
|
|
begin;
|
|
insert into t1i values (1);
|
|
insert into t1i values (2);
|
|
insert into t1i values (3);
|
|
commit;
|
|
begin;
|
|
insert into t1i values (5);
|
|
begin;
|
|
insert into t1i values (4);
|
|
insert into t2m values (1);
|
|
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.
|
|
insert into t1i values (5);
|
|
commit;
|
|
zero
|
|
0
|
|
stop slave;
|
|
rollback;
|
|
include/wait_for_slave_to_stop.inc
|
|
*** sql thread is *not* running: No ***
|
|
*** the prove: the stopped slave has finished the current transaction ***
|
|
five
|
|
5
|
|
zero
|
|
0
|
|
one
|
|
1
|
|
include/start_slave.inc
|
|
drop table t1i, t2m;
|
|
#
|
|
# Bug#56096 STOP SLAVE hangs if executed in parallel with user sleep
|
|
#
|
|
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (a INT );
|
|
# Slave1: lock table for synchronization
|
|
LOCK TABLES t1 WRITE;
|
|
# Master: insert into the table
|
|
INSERT INTO t1 SELECT SLEEP(4);
|
|
Warnings:
|
|
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
|
|
# Slave: wait for the insert
|
|
# Slave: send slave stop
|
|
STOP SLAVE;
|
|
# Slave1: wait for stop slave
|
|
# Slave1: unlock the table
|
|
UNLOCK TABLES;
|
|
# Slave: wait for the slave to stop
|
|
include/wait_for_slave_to_stop.inc
|
|
# Start slave again
|
|
include/start_slave.inc
|
|
# Clean up
|
|
DROP TABLE t1;
|
|
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_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");
|
|
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
|
|
include/rpl_end.inc
|