Multi-source replication (MDEV-253)

[MDEV-551] Multi-source: Non-descriptive error message in the error log on creating a duplicate replication configuration Created: 2012-09-26  Updated: 2012-09-28  Resolved: 2012-09-28

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

Type: Technical task Priority: Minor
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates

 Description   

I have a replication connection 'master1' to master X. If I try to create another one, 'master2' to the same master, I get the error ER_MASTER_INFO (Could not initialize master info structure for 'master2'; more error messages can be found in the MariaDB error log), which is totally fine; but the error in the server log file, which it refers to, only says

120926 16:30:52 [ERROR] Connection 'master1' already exists

It is not really helpful – it doesn't even mention 'master2', which I had the problem with, so it will be pretty difficult to find in the error log and connect to the problem at hand. It would be nicer if it said something like "Connection 'master2' could not be created because it conflicts with the existing connection 'master1'", or alike. Even better if it also contained the parameters of both connections (master host/port)

Test case (it's supposed to be used with my.cnf from multi-source; no need to add it to the suite though, it's just a fragment of a bigger test which I'll provide separately):

cat suite/multi_source/duplicate_master.test

--enable_connect_log
 
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
 
# Start replication from the first master
 
--replace_result $SERVER_MYPORT_1 MYPORT_1
eval change master 'master1' to
master_port=$SERVER_MYPORT_1,
master_host='127.0.0.1',
master_user='root';
 
start slave 'master1';
set default_master_connection = 'master1';
--source include/wait_for_slave_to_start.inc
 
# Try to configure a connection with the same master
# using a different name
 
--replace_result $SERVER_MYPORT_1 MYPORT_1
--error ER_MASTER_INFO
eval change master 'master2' to
master_port=$SERVER_MYPORT_1,
master_host='127.0.0.1',
master_user='root';



 Comments   
Comment by Michael Widenius [ 2012-09-28 ]

This happened mainly because I reused the error message.
I will add a new error message for the case of conflicting entries.

Comment by Michael Widenius [ 2012-09-28 ]

One now gets the error:
"Connection '%.*s' conflicts with existing connection '%.*s'"

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