mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add query to the exception message in case of error during processing INSERT block on client
Since client process the INSERT block itself, and only after, send it to the client, for example: clickhouse-client --stacktrace --input_format_null_as_default=1 --query="INSERT INTO FUNCTION null('k Int, v Tuple(Int,Int)') VALUES ()" Code: 62. DB::Exception: Cannot parse expression of type Int32 here: ): While executing ValuesBlockInputFormat: (in query: INSERT INTO FUNCTION null('k Int, v Tuple(Int,Int)') VALUES ()): data for INSERT was parsed from query. (SYNTAX_ERROR), Stack trace (when copying this message, always include the lines below):
This commit is contained in:
parent
648d561242
commit
baac2e561c
@ -2033,8 +2033,21 @@ private:
|
||||
PullingAsyncPipelineExecutor executor(pipeline);
|
||||
|
||||
Block block;
|
||||
while (executor.pull(block))
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!executor.pull(block))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception & e)
|
||||
{
|
||||
e.addMessage(fmt::format("(in query: {})", full_query));
|
||||
throw;
|
||||
}
|
||||
|
||||
/// Check if server send Log packet
|
||||
receiveLogs();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user