[MDEV-17774] MTR: $SLAVE_MYSOCK/$SLAVE_MYPORT wrongly connects to master Created: 2018-11-19  Updated: 2020-10-02  Resolved: 2020-10-02

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.3
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Aleksey Midenkov Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

Reproduce

--source include/master-slave.inc
--source include/have_innodb.inc
 
connect (conn1,localhost,root,,test,$SLAVE_MYPORT,);
select @@port;
 
connect (conn2,localhost,root,,test,,$SLAVE_MYSOCK);
select @@port;
 
--echo Connecting client via -P
--exec echo "select @@port;" |$MYSQL -P $SLAVE_MYPORT test
 
--echo Connecting client via -S
--exec echo "select @@port;" |$MYSQL -S $SLAVE_MYSOCK test
 
--connection master
--source include/rpl_end.inc

Result on Windows

connect  conn1,localhost,root,,test,$SLAVE_MYPORT,;
select @@port;
@@port
16001
connect  conn2,localhost,root,,test,,$SLAVE_MYSOCK;
select @@port;
@@port
16000
Connecting client via -P
@@port
16001
Connecting client via -S
@@port
16000

Result on Linux

connect  conn1,localhost,root,,test,$SLAVE_MYPORT,;
select @@port;
@@port
16000
connect  conn2,localhost,root,,test,,$SLAVE_MYSOCK;
select @@port;
@@port
16001
Connecting client via -P
@@port
16000
Connecting client via -S
@@port
16001

On Linux it works vice-versa: $SLAVE_MYPORT is incorrect and $SLAVE_MYSOCK is correct.

Expected

In all cases port 16001 returned or connection is failed with appropriate error message.



 Comments   
Comment by Sergei Golubchik [ 2020-10-02 ]

https://mariadb.com/kb/en/mysql-command-line-client/#how-to-specify-which-protocol-to-use-when-connecting-to-the-mysqld-server

Generated at Thu Feb 08 08:39:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.