Details
-
Technical task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
None
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';
|