Merge pull request #2909 from wawaka/wawaka/fix_reading_user_from_config

ISSUES-2629 clickhouse-client: fix reading user from config
This commit is contained in:
alexey-milovidov 2018-08-21 19:22:48 +03:00 committed by GitHub
commit 408ca4649e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1685,7 +1685,7 @@ public:
config().setInt("port", options["port"].as<int>());
if (options.count("secure"))
config().setBool("secure", true);
if (options.count("user"))
if (options.count("user") && !options["user"].defaulted())
config().setString("user", options["user"].as<std::string>());
if (options.count("password"))
config().setString("password", options["password"].as<std::string>());