maria-developers team mailing list archive
Mailing list archive
Re: 2f9bbf392072: MDEV-18734 optimization by taking ownership via String::swap()
On Jun 03, Aleksey Midenkov wrote:
> Hi Sergei!
> Do you plan to fix everything you just said and push yourself or let
> me push it as is?
Neither. As a reviewer I plan to reply "ok to push" when the code is
changed according to the review.
> Btw, there were many allocations over one loop: that's why I used
> mem_root. multi_malloc() won't do the job there. That could be done
> either with explicit moving pointer or some utility class holding such
> pointer. I decided to upgrade mem_root for such pattern so it could do
> the double job and we had a cleaner code.
Yes, I mean
&blob_storage, table->s->blob_fields * sizeof(Ordered_blob_storage *),
&ptr, table->s->blob_fields * sizeof(Ordered_blob_storage), NULL);
for (uint j= 0; j < table->s->blob_fields; ++j, ++ptr)
blob_storage[j]= new (ptr) Ordered_blob_storage;
VP of MariaDB Server Engineering