mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Addition to prev. revision [#METR-23279].
This commit is contained in:
parent
61646cbd01
commit
a081f5f05b
@ -422,9 +422,6 @@ void TCPHandler::receiveHello()
|
||||
{
|
||||
/// Получить hello пакет.
|
||||
UInt64 packet_type = 0;
|
||||
String client_name;
|
||||
UInt64 client_version_major = 0;
|
||||
UInt64 client_version_minor = 0;
|
||||
String user = "default";
|
||||
String password;
|
||||
|
||||
@ -532,8 +529,15 @@ void TCPHandler::receiveQuery()
|
||||
if (client_revision >= DBMS_MIN_REVISION_WITH_CLIENT_INFO)
|
||||
client_info.read(*in);
|
||||
|
||||
/// For better support of old clients, that does not send ClientInfo.
|
||||
if (client_info.query_kind == ClientInfo::QueryKind::NO_QUERY)
|
||||
{
|
||||
client_info.query_kind = ClientInfo::QueryKind::INITIAL_QUERY;
|
||||
client_info.client_name = client_name;
|
||||
client_info.client_version_major = client_version_major;
|
||||
client_info.client_version_minor = client_version_minor;
|
||||
client_info.client_revision = client_revision;
|
||||
}
|
||||
|
||||
/// Set fields, that are known apriori.
|
||||
client_info.interface = ClientInfo::Interface::TCP;
|
||||
|
@ -87,7 +87,10 @@ private:
|
||||
Server & server;
|
||||
Logger * log;
|
||||
|
||||
UInt64 client_revision;
|
||||
String client_name;
|
||||
UInt64 client_version_major = 0;
|
||||
UInt64 client_version_minor = 0;
|
||||
UInt64 client_revision = 0;
|
||||
|
||||
Context connection_context;
|
||||
Context query_context;
|
||||
|
Loading…
Reference in New Issue
Block a user