Reload client connection params before reconnection. #2580

This commit is contained in:
Nikolai Kochetov 2018-07-02 15:32:40 +03:00 committed by alexey-milovidov
parent 9845814701
commit 323578c8b6

View File

@ -374,7 +374,6 @@ private:
echo_queries = config().getBool("echo", false); echo_queries = config().getBool("echo", false);
} }
connection_parameters = ConnectionParameters(config());
connect(); connect();
/// Initialize DateLUT here to avoid counting time spent here as query execution time. /// Initialize DateLUT here to avoid counting time spent here as query execution time.
@ -492,6 +491,8 @@ private:
void connect() void connect()
{ {
connection_parameters = ConnectionParameters(config());
if (is_interactive) if (is_interactive)
std::cout << "Connecting to " std::cout << "Connecting to "
<< (!connection_parameters.default_database.empty() ? "database " + connection_parameters.default_database + " at " : "") << (!connection_parameters.default_database.empty() ? "database " + connection_parameters.default_database + " at " : "")