diff --git a/dbms/programs/client/Client.cpp b/dbms/programs/client/Client.cpp index 8d709dd0e3b..212a6500afd 100644 --- a/dbms/programs/client/Client.cpp +++ b/dbms/programs/client/Client.cpp @@ -757,6 +757,9 @@ private: bool process(const String & text) { + if (exit_strings.end() != exit_strings.find(trim(text, [](char c){ return isWhitespaceASCII(c) || c == ';'; }))) + return false; + const bool test_mode = config().has("testmode"); if (config().has("multiquery")) { @@ -851,9 +854,6 @@ private: bool processSingleQuery(const String & line, ASTPtr parsed_query_ = nullptr) { - if (exit_strings.end() != exit_strings.find(trim(line, [](char c){ return isWhitespaceASCII(c) || c == ';'; }))) - return false; - resetOutput(); got_exception = false;