Remove wrong code, fix #19283

This commit is contained in:
Alexey Milovidov 2021-04-13 23:28:45 +03:00
parent 97611faad0
commit 7773b76232

View File

@ -2252,30 +2252,26 @@ private:
return;
processed_rows += block.rows();
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))
{
block_out_stream->write(block);
written_first_block = true;
}
if (block.rows() == 0 || (query_fuzzer_runs != 0 && processed_rows >= 100))
return;
initBlockOutputStream(block);
bool clear_progress = false;
if (need_render_progress)
clear_progress = std_out.offset() > 0;
if (clear_progress)
clearProgress();
block_out_stream->write(block);
written_first_block = true;
/// Received data block is immediately displayed to the user.
block_out_stream->flush();
/// Restore progress bar after data block.
if (clear_progress)
if (need_render_progress)
writeProgress();
}