From 5e80bd636586886e0dd0c267d633df13a9bfa094 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 22 Jan 2018 00:59:03 +0300 Subject: [PATCH] Miscellaneous [#CLICKHOUSE-2] --- dbms/src/Server/Client.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dbms/src/Server/Client.cpp b/dbms/src/Server/Client.cpp index d483cf27c1e..47239c97c6c 100644 --- a/dbms/src/Server/Client.cpp +++ b/dbms/src/Server/Client.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -433,12 +434,6 @@ private: } - static bool isWhitespace(char c) - { - return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f'; - } - - /// Check if multi-line query is inserted from the paste buffer. /// Allows delaying the start of query execution until the entirety of query is inserted. static bool hasDataInSTDIN() @@ -461,7 +456,7 @@ private: free(line_); size_t ws = line.size(); - while (ws > 0 && isWhitespace(line[ws - 1])) + while (ws > 0 && isWhitespaceASCII(line[ws - 1])) --ws; if (ws == 0 && query.empty()) @@ -592,7 +587,7 @@ private: query = text.substr(begin - text.data(), pos - begin); begin = pos; - while (isWhitespace(*begin) || *begin == ';') + while (isWhitespaceASCII(*begin) || *begin == ';') ++begin; try