Small fix

This commit is contained in:
kssenii 2021-09-26 21:22:04 +00:00
parent 2129230b1e
commit 8e200b68a4
3 changed files with 8 additions and 9 deletions

View File

@ -385,7 +385,7 @@ void ClientBase::processTextAsSingleQuery(const String & full_query)
{
if (!is_interactive)
{
e.addMessage("(query: {})", full_query);
e.addMessage("(in query: {})", full_query);
throw;
}
}

View File

@ -2,6 +2,7 @@
#include <Interpreters/executeQuery.h>
#include <Storages/IStorage.h>
namespace DB
{
@ -362,8 +363,8 @@ Packet LocalConnection::receivePacket()
break;
}
default:
throw Exception("Unknown packet " + toString(packet.type)
+ " from server " + getDescription(), ErrorCodes::UNKNOWN_PACKET_FROM_SERVER);
throw Exception(ErrorCodes::UNKNOWN_PACKET_FROM_SERVER,
"Unknown packet {} for {}", toString(packet.type), getDescription());
}
next_packet_type.reset();

View File

@ -12,7 +12,6 @@
namespace DB
{
/// State of query processing.
struct LocalQueryState
{
@ -124,15 +123,14 @@ private:
ContextMutablePtr query_context;
Session session;
bool send_progress;
std::optional<ThreadStatus> thread_status;
/// At the moment, only one ongoing query in the connection is supported at a time.
bool send_progress;
String description = "clickhouse-local";
std::optional<ThreadStatus> thread_status;
std::optional<LocalQueryState> state;
/// Last "server" packet.
std::optional<UInt64> next_packet_type;
String description = "clickhouse-local";
};
}