mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
f875c9f2a0
1. After a period of wait (where last_master_timestamp=0) do NOT restore the last_master_timestamp to the timestamp of the last executed event (which would mean we've just executed it, and we're that much behind the master). 2. Update last_master_timestamp before executing the event, not after. Take the approach from the this commit (but with a different test case that actually makes sense): commit 0c75ab453fb8c5439576af8fe5add7a1b89f1569 Author: Luis Soares <luis.soares@sun.com> Date: Thu Apr 15 17:39:31 2010 +0100 BUG#52166: Seconds_Behind_Master spikes after long idle period
10 lines
456 B
Text
10 lines
456 B
Text
include/master-slave.inc
|
|
[connection master]
|
|
call mtr.add_suppression("Unsafe statement written to the binary log");
|
|
CREATE TABLE t1 (a int);
|
|
INSERT INTO t1 VALUES(SLEEP(2));
|
|
Seconds_Behind_Master: 1
|
|
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.
|
|
drop table t1;
|
|
include/rpl_end.inc
|