mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
dbms: added support for multiquery in interactive mode [#METR-17471].
This commit is contained in:
parent
6acbf3db3e
commit
d9e76da292
@ -477,6 +477,12 @@ private:
|
||||
copyData(in, out);
|
||||
}
|
||||
|
||||
process(line);
|
||||
}
|
||||
|
||||
|
||||
bool process(const String & line)
|
||||
{
|
||||
if (config().has("multiquery"))
|
||||
{
|
||||
/// Несколько запросов, разделенных ';'.
|
||||
@ -507,17 +513,20 @@ private:
|
||||
while (isWhitespace(*begin) || *begin == ';')
|
||||
++begin;
|
||||
|
||||
process(query, ast);
|
||||
if (!processSingleQuery(query, ast))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
process(line);
|
||||
return processSingleQuery(line);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool process(const String & line, ASTPtr parsed_query_ = nullptr)
|
||||
bool processSingleQuery(const String & line, ASTPtr parsed_query_ = nullptr)
|
||||
{
|
||||
if (exit_strings.end() != exit_strings.find(line))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user