mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Add constants to ClientInfo::Interface for MySQL and PostgreSQL protocols.
This commit is contained in:
parent
4b3488934c
commit
99343bc127
@ -26,6 +26,8 @@ public:
|
||||
TCP = 1,
|
||||
HTTP = 2,
|
||||
GRPC = 3,
|
||||
MYSQL = 4,
|
||||
POSTGRESQL = 5,
|
||||
};
|
||||
|
||||
enum class HTTPMethod : uint8_t
|
||||
|
@ -87,6 +87,7 @@ MySQLHandler::MySQLHandler(IServer & server_, const Poco::Net::StreamSocket & so
|
||||
void MySQLHandler::run()
|
||||
{
|
||||
connection_context.makeSessionContext();
|
||||
connection_context.getClientInfo().interface = ClientInfo::Interface::MYSQL;
|
||||
connection_context.setDefaultFormat("MySQLWire");
|
||||
|
||||
in = std::make_shared<ReadBufferFromPocoSocket>(socket());
|
||||
|
@ -50,6 +50,7 @@ void PostgreSQLHandler::changeIO(Poco::Net::StreamSocket & socket)
|
||||
void PostgreSQLHandler::run()
|
||||
{
|
||||
connection_context.makeSessionContext();
|
||||
connection_context.getClientInfo().interface = ClientInfo::Interface::POSTGRESQL;
|
||||
connection_context.setDefaultFormat("PostgreSQLWire");
|
||||
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user