[MDEV-11177] mysqlbinlog exits silently without error when another instance connects to server Created: 2016-10-30  Updated: 2017-08-04  Resolved: 2017-03-21

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.2
Fix Version/s: 10.2.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: 10.2-ga

Issue Links:
Relates
relates to MDEV-13448 Slave should reconnect less quickly w... Confirmed
relates to MDEV-13449 Master should also log server-id coll... Confirmed
relates to MDEV-8713 Add continuous binary log backup to m... Closed
Sprint: 10.2.4-4, 10.2.4-5, 10.2.5-1

 Description   

When mysqlbinlog reads binlogs from a remote server (with stop-never), it connects to the server with a certain ID, either default or explicitly set. If another instance of mysqlbinlog connects with the same ID, the previous one exits. In MySQL, it returns a non-zero exit code and a clear enough error message:

ERROR: Got error reading packet from server: A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-bin.000001' at 4, the last event read from './mysql-bin.000051' at 4700, the last byte read from './mysql-bin.000051' at 4700.

In MariaDB, it exits silently with success code and without error messages. It's dangerous, because it will make user believe all logs have been stored.



 Comments   
Comment by Alexey Botchkov [ 2017-03-13 ]

http://lists.askmonty.org/pipermail/commits/2017-March/010843.html

MySQL adds the 'duplicate_slave_id' flag to the THD and keeps the same KILL_QUERY status. I think adding the new KILL_SLAVE_SAME_ID status is more natural and lightweight.

Generated at Thu Feb 08 07:47:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.