[MDEV-4490] Old-style master position points at the last GTID event after slave restart Created: 2013-05-06  Updated: 2013-06-07  Resolved: 2013-06-07

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.2
Fix Version/s: 10.0.4

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-26 Global transaction ID Closed

 Description   

If a slave is restarted when it's synchronized with the master, and there are no new events in the master binlog, the old-style replication coordinates on the slave are not set properly (point at the last GTID event).
As a result, MASTER_POS_WAIT for the current master position does not return.
Another potential problem is that if at this point the slave is reconfigured NOT to use GTID, the last event will be re-executed, thus causing data inconsistency.

Test case:

--source include/master-slave.inc
 
--connection slave
--source include/stop_slave.inc
eval CHANGE MASTER TO master_use_gtid=1;
--source include/start_slave.inc
 
--connection master
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1);
 
--sync_slave_with_master
 
--enable_reconnect
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
restart: --skip-slave-start=0
EOF
--shutdown_server 60
--source include/wait_until_connected_again.inc
 
--connection master
 
--echo # If we do INSERT here, everything works okay.
--echo # But if we don't, sync_slave_with_master hangs
--echo # because MASTER_POS_WAIT for the current master position
--echo # never returns
# insert into t1 values (2);
 
show master status;
 
--sync_slave_with_master
SELECT * FROM t1;

bzr version-info

revision-id: knielsen@knielsen-hq.org-20130506123534-v8r8bhazhj5gr1he
revno: 3628
branch-nick: 10.0-base



 Comments   
Comment by Kristian Nielsen [ 2013-06-07 ]

Pushed to 10.0-base

Generated at Thu Feb 08 06:56:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.