Client: Don't exit (only break) at first error in interactive mode when processing multiple queries in one command [#METR-19563].

This commit is contained in:
Alexey Milovidov 2016-10-15 03:38:59 +03:00
parent ff56176f4a
commit b1f551d5ba
3 changed files with 13 additions and 1 deletions

View File

@ -569,8 +569,16 @@ private:
while (isWhitespace(*begin) || *begin == ';')
++begin;
if (!processSingleQuery(query, ast) || got_exception)
if (!processSingleQuery(query, ast))
return false;
if (got_exception)
{
if (is_interactive)
break;
else
return false;
}
}
return true;

View File

@ -0,0 +1,3 @@
#!/bin/bash
clickhouse-client --multiquery --query="SELECT 1; SELECT xyz; SELECT 2;" 2> /dev/null;