Merge pull request #61530 from ClickHouse/fix-client-s

Fix client `-s` argument
This commit is contained in:
Mikhail f. Shiryaev 2024-03-21 10:17:45 +01:00 committed by GitHub
commit 5b0610b9e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View File

@ -933,7 +933,7 @@ void Client::addOptions(OptionsDescription & options_description)
("config,c", po::value<std::string>(), "config-file path (another shorthand)")
("connection", po::value<std::string>(), "connection to use (from the client config), by default connection name is hostname")
("secure,s", "Use TLS connection")
("no-secure,s", "Don't use TLS connection")
("no-secure", "Don't use TLS connection")
("user,u", po::value<std::string>()->default_value("default"), "user")
("password", po::value<std::string>(), "password")
("ask-password", "ask-password")

View File

@ -1,3 +1,5 @@
0
1
2
3
4

View File

@ -7,6 +7,12 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
$CLICKHOUSE_CLIENT --no-secure -q "SELECT 0;"
# Use $CLICKHOUSE_CLIENT_SECURE, but replace `--secure` by `-s` to test it
CLICKHOUSE_CLIENT_S=${CLICKHOUSE_CLIENT_SECURE/ --secure / -s }
$CLICKHOUSE_CLIENT_S -q "SELECT 1;"
$CLICKHOUSE_CLIENT_SECURE -q "SELECT 2;"
#disable test