Merge pull request #3351 from CurtizJ/CLICKHOUSE-3974

Create client_info when it`s not initialized [CLICKHOUSE-3974]
This commit is contained in:
alexey-milovidov 2018-10-11 22:09:25 +03:00 committed by GitHub
commit 9f494b0278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -349,7 +349,7 @@ void Connection::sendQuery(
{
ClientInfo client_info_to_send;
if (!client_info)
if (!client_info || client_info->empty())
{
/// No client info passed - means this query initiated by me.
client_info_to_send.query_kind = ClientInfo::QueryKind::INITIAL_QUERY;