From 729ecfa9ab5a3f18e7c9962e395e372201793c07 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 9 Jul 2019 19:41:11 +0300 Subject: [PATCH] Fixed build without SSL (disable MySQL protocol support) --- dbms/programs/server/Server.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dbms/programs/server/Server.cpp b/dbms/programs/server/Server.cpp index c82d3e1e95b..3d50466df84 100644 --- a/dbms/programs/server/Server.cpp +++ b/dbms/programs/server/Server.cpp @@ -746,6 +746,7 @@ int Server::main(const std::vector & /*args*/) if (config().has("mysql_port")) { +#if USE_POCO_NETSSL Poco::Net::ServerSocket socket; auto address = socket_bind_listen(socket, listen_host, config().getInt("mysql_port"), /* secure = */ true); socket.setReceiveTimeout(Poco::Timespan()); @@ -757,6 +758,10 @@ int Server::main(const std::vector & /*args*/) new Poco::Net::TCPServerParams)); LOG_INFO(log, "Listening for MySQL compatibility protocol: " + address.toString()); +#else + throw Exception{"SSL support for MySQL protocol is disabled because Poco library was built without NetSSL support.", + ErrorCodes::SUPPORT_IS_DISABLED}; +#endif } } catch (const Poco::Exception & e)