mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
dbms: development [#CONV-2944].
This commit is contained in:
parent
680936cf2a
commit
f4a8dad41c
@ -389,6 +389,9 @@ private:
|
||||
? query.substr(0, parsed_insert_query.data - query.data())
|
||||
: query;
|
||||
|
||||
if ((is_interactive && !parsed_insert_query.data) || (!is_interactive && std_in.eof()))
|
||||
throw Exception("No data to insert", ErrorCodes::NO_DATA_TO_INSERT);
|
||||
|
||||
connection->sendQuery(query_without_data, query_id, QueryProcessingStage::Complete);
|
||||
|
||||
/// Получим структуру таблицы
|
||||
@ -446,7 +449,7 @@ private:
|
||||
ReadBuffer data_in(const_cast<char *>(parsed_insert_query->data), parsed_insert_query->end - parsed_insert_query->data, 0);
|
||||
sendDataFrom(data_in, sample);
|
||||
}
|
||||
else if (!is_interactive)
|
||||
else if (!is_interactive && !std_in.eof())
|
||||
{
|
||||
/// Отправляем данные из stdin.
|
||||
sendDataFrom(std_in, sample);
|
||||
|
@ -153,6 +153,7 @@ void Connection::sendData(const Block & block)
|
||||
|
||||
writeVarUInt(Protocol::Client::Data, *out);
|
||||
block_out->write(block);
|
||||
maybe_compressed_out->next();
|
||||
out->next();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user