Commit 6008fa95 authored by unknown's avatar unknown

Small bug fix in SP item reusal (debug mode only).


sql/item.cc:
  Get the size before trashing (in debug mode only).
parent cc458e00
...@@ -301,10 +301,10 @@ void *Item::operator new(size_t size, Item *reuse, uint *rsize) ...@@ -301,10 +301,10 @@ void *Item::operator new(size_t size, Item *reuse, uint *rsize)
{ {
if (reuse && size <= reuse->rsize) if (reuse && size <= reuse->rsize)
{ {
reuse->cleanup();
TRASH((void *)reuse, size);
if (rsize) if (rsize)
(*rsize)= reuse->rsize; (*rsize)= reuse->rsize;
reuse->cleanup();
TRASH((void *)reuse, size);
return (void *)reuse; return (void *)reuse;
} }
if (rsize) if (rsize)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment