mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-25 19:20:52 +00:00
More approprate fix
This commit is contained in:
parent
1993d8e0f4
commit
f9a2c39701
@ -352,10 +352,6 @@ static ReturnType parseJSONEscapeSequence(Vector & s, ReadBuffer & buf)
|
||||
|
||||
++buf.position();
|
||||
|
||||
/// It is possible that current buffer ends with `\` (start of escape sequence), oef is not reached,
|
||||
/// but there is no pending data yet. Without this wait we will read beyond the end of current buffer in code below.
|
||||
while (!buf.eof() && !buf.hasPendingData()) {}
|
||||
|
||||
if (buf.eof())
|
||||
return error("Cannot parse escape sequence", ErrorCodes::CANNOT_PARSE_ESCAPE_SEQUENCE);
|
||||
|
||||
@ -1150,8 +1146,6 @@ bool loadAtPosition(ReadBuffer & in, DB::Memory<> & memory, char * & current)
|
||||
if (current < in.buffer().end())
|
||||
return true;
|
||||
|
||||
while (!in.eof() && !in.hasPendingData()) {}
|
||||
|
||||
saveUpToPosition(in, memory, current);
|
||||
|
||||
bool loaded_more = !in.eof();
|
||||
|
@ -56,6 +56,10 @@ bool ZstdInflatingReadBuffer::nextImpl()
|
||||
eof = true;
|
||||
return !working_buffer.empty();
|
||||
}
|
||||
else if (output.pos == 0)
|
||||
{
|
||||
return nextImpl();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user