This commit is contained in:
Robert Schulze 2024-09-19 11:21:41 +02:00 committed by GitHub
commit be32bfce69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -477,14 +477,10 @@ void MySQLHandler::comQuery(ReadBuffer & payload, bool binary_protocol)
auto query_context = session->makeQueryContext();
query_context->setCurrentQueryId(fmt::format("mysql:{}:{}", connection_id, toString(UUIDHelpers::generateV4())));
/// --- Workaround for Bug 56173. Can be removed when the analyzer is on by default.
auto settings = query_context->getSettingsCopy();
settings.prefer_column_name_to_alias = true;
query_context->setSettings(settings);
/// Update timeouts
socket().setReceiveTimeout(settings.receive_timeout);
socket().setSendTimeout(settings.send_timeout);
socket().setReceiveTimeout(query_context->getSettingsRef().receive_timeout);
socket().setSendTimeout(query_context->getSettingsRef().send_timeout);
CurrentThread::QueryScope query_scope{query_context};