mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Merge pull request #46730 from ClickHouse/evillique-patch-1
Ask for the password in clickhouse-client interactively
This commit is contained in:
commit
164c0c9927
@ -327,7 +327,21 @@ try
|
||||
showClientVersion();
|
||||
}
|
||||
|
||||
connect();
|
||||
try
|
||||
{
|
||||
connect();
|
||||
}
|
||||
catch (const Exception & e)
|
||||
{
|
||||
if (e.code() != DB::ErrorCodes::AUTHENTICATION_FAILED ||
|
||||
config().has("password") ||
|
||||
config().getBool("ask-password", false) ||
|
||||
!is_interactive)
|
||||
throw;
|
||||
|
||||
config().setBool("ask-password", true);
|
||||
connect();
|
||||
}
|
||||
|
||||
/// Show warnings at the beginning of connection.
|
||||
if (is_interactive && !config().has("no-warnings"))
|
||||
|
Loading…
Reference in New Issue
Block a user