Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.0.4
-
Fix Version/s: 10.0.5
-
Component/s: None
-
Labels:
Description
With a simple test table, shown here on the slave:
mysql 15:39:00 [PA DEV 002] [eis] [3202]> select * from mfp; +------+ | c1 | +------+ | 11 | | 22 | | 33 | | 44 | | 55 | +------+ 5 rows in set (0.00 sec) mysql 15:39:02 [PA DEV 002] [eis] [3202]> delete from mfp; Query OK, 5 rows affected (0.00 sec)
I then also deleted all these rows on the master simply to explore the options for repairing replication using
SET GLOBAL gtid_slave_pos = 'XXX'
However, simply stopping and starting the slave ( sometimes twice ) skipped the transactions with no other actions required:
mysql 15:39:09 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1412 | | gtid_current_pos | 3102-223202-1412 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-409 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:40:24 [PA DEV 002] [eis] [3202]> stop slave; start slave; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) mysql 15:45:21 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1413 | | gtid_current_pos | 3102-223202-1413 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-410 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:45:24 [PA DEV 002] [eis] [3202]> stop slave; start slave; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql 15:45:28 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1413 | | gtid_current_pos | 3102-223202-1413 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-410 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:45:30 [PA DEV 002] [eis] [3202]> stop slave; start slave; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) mysql 15:45:32 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1413 | | gtid_current_pos | 3102-223202-1413 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-411 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:45:34 [PA DEV 002] [eis] [3202]> stop slave; start slave; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) mysql 15:45:36 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1413 | | gtid_current_pos | 3102-223202-1413 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-411 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:45:37 [PA DEV 002] [eis] [3202]> stop slave; start slave; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) mysql 15:45:39 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1413 | | gtid_current_pos | 3102-223202-1413 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-412 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:45:41 [PA DEV 002] [eis] [3202]> stop slave; start slave; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql 15:45:43 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1413 | | gtid_current_pos | 3102-223202-1413 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-412 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:45:44 [PA DEV 002] [eis] [3202]> stop slave; start slave; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql 15:45:47 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1413 | | gtid_current_pos | 3102-223202-1413 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-413 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:46:23 [PA DEV 002] [eis] [3202]> stop slave; start slave; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) mysql 15:46:26 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1413 | | gtid_current_pos | 3102-223202-1413 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-413 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:46:28 [PA DEV 002] [eis] [3202]> stop slave; start slave; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) mysql 15:46:29 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1413 | | gtid_current_pos | 3102-223202-1413 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-414 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:46:31 [PA DEV 002] [eis] [3202]> stop slave; start slave; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) mysql 15:46:39 [PA DEV 002] [eis] [3202]> show variables like "%gtid%"; +------------------+------------------+ | Variable_name | Value | +------------------+------------------+ | gtid_binlog_pos | 3102-223202-1413 | | gtid_current_pos | 3102-223202-1413 | | gtid_domain_id | 3102 | | gtid_seq_no | 0 | | gtid_slave_pos | 3102-223102-416 | | gtid_strict_mode | OFF | +------------------+------------------+ 6 rows in set (0.00 sec) mysql 15:46:41 [PA DEV 002] [eis] [3202]>
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Master
Slave
Master
The Slave will now show a replication failure:
From the slave, I run "stop slave; start slave;"
And the GTID replication rolls forward!
MariaDB [test]> show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 127.0.0.1 Master_User: root Master_Port: 3000 Connect_Retry: 60 Master_Log_File: mysql-log-bin.000003 Read_Master_Log_Pos: 8641 Relay_Log_File: mysql-relay-bin.000002 Relay_Log_Pos: 781 Relay_Master_Log_File: mysql-log-bin.000003 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 8641 Relay_Log_Space: 1078 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 0 Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 0 Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 1376396033 Master_SSL_Crl: Master_SSL_Crlpath: Using_Gtid: Slave_Pos