mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Correct TRASH() macro usage
TRASH was mapped to TRASH_FREE and was supposed to be used for memory that should not be accessed anymore, while TRASH_ALLOC() is to be used for uninitialized but to-be-used memory. But sometimes TRASH() was used in the latter sense. Remove TRASH() macro, always use explicit TRASH_ALLOC() or TRASH_FREE().
This commit is contained in:
@ -2651,7 +2651,7 @@ public:
|
||||
/* Table read plans are allocated on MEM_ROOT and are never deleted */
|
||||
static void *operator new(size_t size, MEM_ROOT *mem_root)
|
||||
{ return (void*) alloc_root(mem_root, (uint) size); }
|
||||
static void operator delete(void *ptr,size_t size) { TRASH(ptr, size); }
|
||||
static void operator delete(void *ptr,size_t size) { TRASH_FREE(ptr, size); }
|
||||
static void operator delete(void *ptr, MEM_ROOT *mem_root) { /* Never called */ }
|
||||
virtual ~TABLE_READ_PLAN() {} /* Remove gcc warning */
|
||||
|
||||
|
Reference in New Issue
Block a user