[MDEV-28850] mysql client program conflicting protocol options deserve warnings Created: 2022-06-15  Updated: 2022-06-15

Status: Open
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Andrei Elkin Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-14974 --port ignored for --host=localhost Closed

 Description   

MDEV-14974 has improved on handling combinations of different connection protocol options.

However there are cases when a warning is missed out to inform on (and possibly explain why) a supplied option got ignored. In my view it's better to emit such warnings, even though the docs say on behavioral nuances.
E.g

../client/mysql --port=1234 --protocol=socket --socket=/home/andrei/MDB.WTs/CS/Review/W/mysql-test/var_expr/tmp/mysqld.1.sock --user=root
Welcome to the MariaDB monitor.

port is disregarded (and silently) while host does not:

../client/mysql --protocol=socket --host=127.0.0.1 --socket=/home/andrei/MDB.WTs/CS/Review/W/mysql-test/var_expr/tmp/mysqld.1.sock --user=root
ERROR 2002 (HY000): Can't connect to server on '127.0.0.1' (115)

When both host,port are supplied they are favored over socket, but silently

../client/mysql --host=127.0.0.1 --socket=/home/andrei/MDB.WTs/CS/Review/W/mysql-test/var_expr/tmp/mysqld.1.sock --port=12460 --user=root
Welcome to the MariaDB monitor.


Generated at Thu Feb 08 10:03:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.