diff --git a/dbms/programs/client/Client.cpp b/dbms/programs/client/Client.cpp index 963b3251084..aa80abdc778 100644 --- a/dbms/programs/client/Client.cpp +++ b/dbms/programs/client/Client.cpp @@ -112,7 +112,7 @@ namespace ErrorCodes class Client : public Poco::Util::Application { public: - Client() {} + Client() = default; private: using StringSet = std::unordered_set; @@ -353,10 +353,8 @@ private: return false; auto days = DateLUT::instance().toDayNum(current_time).toUnderType(); - for (auto i = 0ul; i < N; ++i) + for (auto d : chineseNewYearIndicators) { - auto d = chineseNewYearIndicators[i]; - /// Let's celebrate until Lantern Festival if (d <= days && d + 25u >= days) return true; @@ -645,7 +643,7 @@ private: } - inline const String prompt() const + inline String prompt() const { return boost::replace_all_copy(prompt_by_server_display_name, "{database}", config().getString("database", "default")); } diff --git a/dbms/programs/server/Server.cpp b/dbms/programs/server/Server.cpp index 636911c71ca..609306091fe 100644 --- a/dbms/programs/server/Server.cpp +++ b/dbms/programs/server/Server.cpp @@ -698,7 +698,7 @@ int Server::main(const std::vector & /*args*/) return socket_address; }; - auto socket_bind_listen = [&](auto & socket, const std::string & host, UInt16 port, [[maybe_unused]] bool secure = 0) + auto socket_bind_listen = [&](auto & socket, const std::string & host, UInt16 port, [[maybe_unused]] bool secure = false) { auto address = make_socket_address(host, port); #if !defined(POCO_CLICKHOUSE_PATCH) || POCO_VERSION < 0x01090100 diff --git a/dbms/programs/server/TCPHandler.h b/dbms/programs/server/TCPHandler.h index 9ec40329e04..e3783ac282a 100644 --- a/dbms/programs/server/TCPHandler.h +++ b/dbms/programs/server/TCPHandler.h @@ -157,8 +157,8 @@ private: void receiveQuery(); bool receiveData(bool scalar); bool readDataNext(const size_t & poll_interval, const int & receive_timeout); - void readData(const Settings & global_settings); - std::tuple getReadTimeouts(const Settings & global_settings); + void readData(const Settings & connection_settings); + std::tuple getReadTimeouts(const Settings & connection_settings); [[noreturn]] void receiveUnexpectedData(); [[noreturn]] void receiveUnexpectedQuery(); @@ -166,7 +166,7 @@ private: [[noreturn]] void receiveUnexpectedTablesStatusRequest(); /// Process INSERT query - void processInsertQuery(const Settings & global_settings); + void processInsertQuery(const Settings & connection_settings); /// Process a request that does not require the receiving of data blocks from the client void processOrdinaryQuery();