mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Fix clickhouse-local syntax exception
This commit is contained in:
parent
6b22fdc55a
commit
c79c0526ff
@ -32,7 +32,6 @@
|
||||
#include <IO/WriteBufferFromFileDescriptor.h>
|
||||
#include <IO/ReadHelpers.h>
|
||||
#include <IO/UseSSL.h>
|
||||
#include <Parsers/parseQuery.h>
|
||||
#include <Parsers/IAST.h>
|
||||
#include <base/ErrorHandlers.h>
|
||||
#include <Functions/registerFunctions.h>
|
||||
@ -128,9 +127,8 @@ bool LocalServer::executeMultiQuery(const String & all_queries_text)
|
||||
}
|
||||
case MultiQueryProcessingStage::PARSING_EXCEPTION:
|
||||
{
|
||||
this_query_end = find_first_symbols<'\n'>(this_query_end, all_queries_end);
|
||||
this_query_begin = this_query_end; /// It's expected syntax error, skip the line
|
||||
current_exception.reset();
|
||||
if (current_exception)
|
||||
current_exception->rethrow();
|
||||
continue;
|
||||
}
|
||||
case MultiQueryProcessingStage::EXECUTE_QUERY:
|
||||
|
@ -0,0 +1 @@
|
||||
OK
|
8
tests/queries/0_stateless/02050_clickhouse_local_parsing_exception.sh
Executable file
8
tests/queries/0_stateless/02050_clickhouse_local_parsing_exception.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
$CLICKHOUSE_LOCAL --query="SELECT number FROM system.numbers INTO OUTFILE test.native.zst FORMAT Native" 2>&1 | grep -q "Code: 62. DB::Exception: Syntax error: failed at position 48 ('test'): test.native.zst FORMAT Native. Expected string literal." && echo 'OK' || echo 'FAIL' ||:
|
||||
|
Loading…
Reference in New Issue
Block a user