mariadb/client
Monty f272463b02 Cleanup of MDEV-14974: --port ignored for --host=localhost
The old code added to 10.6 was inconsisting in how TCP/IP and
socket connection was chosen. One got also a confusing warning
in some cases.

Examples:
> ../client/mysql --print-defaults
../client/mysql would have been started with the following arguments:
--socket=/tmp/mariadbd.sock --port=3307 --no-auto-rehash
> ../client/mysql
ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mariadbd.sock' (2)
> ../client/mysql --print-defaults
../client/mysql would have been started with the following arguments:
--socket=/tmp/mariadbd.sock --port=3307 --no-auto-rehash
> ../client/mysql --port=3333
WARNING: Forcing protocol to  TCP  due to option specification. Please explicitly state intended protocol.
ERROR 2002 (HY000): Can't connect to server on 'localhost' (111)
> ../client/mysql --port=3333 --socket=sss
ERROR 2002 (HY000): Can't connect to local server through socket 'sss' (2)
> ../client/mysql --socket=sss --port=3333
ERROR 2002 (HY000): Can't connect to local server through socket 'sss' (2)

Some notable things:
- One gets a warning if one uses just --port if config file sets socket
- Using port and socket gives no warning
- Using socket and then port still uses socket

This patch changes things the following ways:
If --port= is given on the command line, the the protocol is automatically
  changed to "TCP/IP".
- If --socket= is given on the command line, the protocol is automatically
  changed to "socket".
- The last option wins
- No warning is given if protocol changes automatically.
2023-04-27 11:34:26 +03:00
..
async_example.c MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
client_metadata.h MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY 2020-03-10 20:43:32 +04:00
client_priv.h Cleanup of MDEV-14974: --port ignored for --host=localhost 2023-04-27 11:34:26 +03:00
CMakeLists.txt Merge remote-tracking branch 'upstream/10.4' into 10.5 2021-09-10 17:16:18 +03:00
completion_hash.cc Merge 10.4 into 10.5 2020-11-03 16:24:47 +02:00
completion_hash.h Update FSF Address 2019-05-11 21:29:06 +03:00
echo.c Fix typos in the codebase. 2022-08-09 18:41:09 +03:00
mariadb-conv.cc mariadb-conv --character-sets-dir 2021-05-20 18:33:07 +02:00
my_readline.h Update FSF Address 2019-05-11 21:29:06 +03:00
mysql.cc Cleanup of MDEV-14974: --port ignored for --host=localhost 2023-04-27 11:34:26 +03:00
mysql_plugin.c Merge 10.5 into 10.6 2023-04-11 16:15:19 +03:00
mysql_upgrade.c Merge 10.5 into 10.6 2023-04-11 16:15:19 +03:00
mysqladmin.cc Cleanup of MDEV-14974: --port ignored for --host=localhost 2023-04-27 11:34:26 +03:00
mysqlbinlog.cc Cleanup of MDEV-14974: --port ignored for --host=localhost 2023-04-27 11:34:26 +03:00
mysqlcheck.c Cleanup of MDEV-14974: --port ignored for --host=localhost 2023-04-27 11:34:26 +03:00
mysqldump.c Cleanup of MDEV-14974: --port ignored for --host=localhost 2023-04-27 11:34:26 +03:00
mysqlimport.c Cleanup of MDEV-14974: --port ignored for --host=localhost 2023-04-27 11:34:26 +03:00
mysqlshow.c Cleanup of MDEV-14974: --port ignored for --host=localhost 2023-04-27 11:34:26 +03:00
mysqlslap.c Cleanup of MDEV-14974: --port ignored for --host=localhost 2023-04-27 11:34:26 +03:00
mysqltest.cc Merge 10.5 into 10.6 2023-04-25 13:10:33 +03:00
readline.cc MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00