mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fixed error #6195
This commit is contained in:
parent
ea6515dac6
commit
f03df37b57
@ -57,7 +57,7 @@ public:
|
||||
: WriteBuffer(nullptr, 0), vector(vector_)
|
||||
{
|
||||
size_t old_size = vector.size();
|
||||
vector.resize(vector.capacity() < initial_size ? initial_size : vector.capacity());
|
||||
vector.resize(std::max(vector.size() + initial_size, vector.capacity()));
|
||||
set(reinterpret_cast<Position>(vector.data() + old_size), (vector.size() - old_size) * sizeof(typename VectorType::value_type));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user