mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fix errors
This commit is contained in:
parent
52a234b048
commit
2d02a3a45d
@ -162,7 +162,7 @@ off_t ReadBufferFromFileDescriptor::seek(off_t offset, int whence)
|
||||
watch.stop();
|
||||
ProfileEvents::increment(ProfileEvents::DiskReadElapsedMicroseconds, watch.elapsedMicroseconds());
|
||||
|
||||
file_offset_of_buffer_end = new_pos;
|
||||
file_offset_of_buffer_end = seek_pos;
|
||||
|
||||
if (offset_after_seek_pos > 0)
|
||||
ignore(offset_after_seek_pos);
|
||||
|
@ -56,10 +56,10 @@ std::unique_ptr<ReadBufferFromFileBase> createReadBufferFromFileBase(
|
||||
|
||||
auto align_up = [=](size_t value) { return (value + min_alignment - 1) / min_alignment * min_alignment; };
|
||||
|
||||
if (alignment % min_alignment)
|
||||
{
|
||||
if (alignment == 0)
|
||||
alignment = min_alignment;
|
||||
else if (alignment % min_alignment)
|
||||
alignment = align_up(alignment);
|
||||
}
|
||||
|
||||
if (buffer_size % min_alignment)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user