Fix error

This commit is contained in:
Alexey Milovidov 2021-04-14 01:04:37 +03:00
parent 7773b76232
commit a57e82a5b4

View File

@ -2253,14 +2253,15 @@ private:
processed_rows += block.rows();
/// Even if all blocks are empty, we still need to initialize the output stream to write empty resultset.
initBlockOutputStream(block);
/// The header block containing zero rows was used to initialize
/// block_out_stream, do not output it.
/// Also do not output too much data if we're fuzzing.
if (block.rows() == 0 || (query_fuzzer_runs != 0 && processed_rows >= 100))
return;
initBlockOutputStream(block);
if (need_render_progress)
clearProgress();