mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
967beb46a6
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.
84 lines
2.8 KiB
Text
84 lines
2.8 KiB
Text
include/master-slave.inc
|
|
[connection master]
|
|
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
|
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");
|
|
include/stop_slave.inc
|
|
SET @old_log_output= @@log_output;
|
|
SET GLOBAL log_output= 'TABLE';
|
|
SET @old_long_query_time= @@long_query_time;
|
|
SET GLOBAL long_query_time= 2;
|
|
TRUNCATE mysql.slow_log;
|
|
include/start_slave.inc
|
|
CREATE TABLE t1 (a int, b int);
|
|
INSERT INTO t1 values(1, 1);
|
|
INSERT INTO t1 values(1, sleep(3));
|
|
TRUNCATE mysql.slow_log;
|
|
SELECT 1, sleep(3);
|
|
1 sleep(3)
|
|
1 0
|
|
SELECT 1;
|
|
1
|
|
1
|
|
TRUNCATE mysql.slow_log;
|
|
SET TIMESTAMP= 1;
|
|
SELECT 2, sleep(3);
|
|
2 sleep(3)
|
|
2 0
|
|
SELECT 2;
|
|
2
|
|
2
|
|
TRUNCATE mysql.slow_log;
|
|
SET @old_slow_query_log= @@slow_query_log;
|
|
SET GLOBAL slow_query_log= 'OFF';
|
|
SELECT 3, sleep(3);
|
|
3 sleep(3)
|
|
3 0
|
|
SELECT 3;
|
|
3
|
|
3
|
|
TRUNCATE mysql.slow_log;
|
|
SET GLOBAL slow_query_log= @old_slow_query_log;
|
|
DROP TABLE t1;
|
|
include/stop_slave.inc
|
|
SET GLOBAL long_query_time= @old_long_query_time;
|
|
SET GLOBAL log_output= @old_log_output;
|
|
include/start_slave.inc
|
|
include/rpl_reset.inc
|
|
SET @old_log_output= @@log_output;
|
|
SET GLOBAL log_output= 'TABLE';
|
|
SET GLOBAL long_query_time= 2;
|
|
SET @old_long_query_time= @@long_query_time;
|
|
SET SESSION long_query_time= 2;
|
|
TRUNCATE mysql.slow_log;
|
|
include/stop_slave.inc
|
|
SET @old_log_output= @@log_output;
|
|
SET GLOBAL log_output= 'TABLE';
|
|
SET @old_long_query_time= @@long_query_time;
|
|
SET GLOBAL long_query_time= 2;
|
|
TRUNCATE mysql.slow_log;
|
|
include/start_slave.inc
|
|
CREATE TABLE t1 (a int, b int);
|
|
********************************************************************
|
|
**** INSERT one row that exceeds long_query_time
|
|
**** Outcome: query ends up in both master and slave slow log
|
|
********************************************************************
|
|
INSERT INTO t1 values(1, sleep(3));
|
|
### Assertion is good. Both Master and Slave exhibit the
|
|
### same number of queries in slow log: 1
|
|
TRUNCATE mysql.slow_log;
|
|
TRUNCATE mysql.slow_log;
|
|
********************************************************************
|
|
**** Now do inserts again, but first add an index to the table.
|
|
**** Outcome: Note that the slave contains the same one entry (as
|
|
**** the master does) whereas before the patch it did not.
|
|
********************************************************************
|
|
ALTER TABLE t1 ADD INDEX id1(a);
|
|
INSERT INTO t1 values(1, sleep(3));
|
|
### Assertion is good. Both Master and Slave exhibit the
|
|
### same number of queries in slow log: 1
|
|
SET @@global.log_output= @old_log_output;
|
|
SET @@global.long_query_time= @old_long_query_time;
|
|
DROP TABLE t1;
|
|
SET @@global.log_output= @old_log_output;
|
|
SET @@global.long_query_time= @old_long_query_time;
|
|
include/rpl_end.inc
|