333
334
#ifdef DRIZZLE_SERVER
339
List of items created in the parser for this query. Every item puts
340
itself to the list on creation (see Item::Item() for details))
343
MEM_ROOT *mem_root; // Pointer to current memroot
345
Query_arena(MEM_ROOT *mem_root_arg) :
346
free_list(0), mem_root(mem_root_arg)
349
This constructor is used only when Query_arena is created as
350
backup storage for another instance of Query_arena.
354
virtual ~Query_arena() {};
356
inline void* alloc(size_t size) { return alloc_root(mem_root,size); }
357
inline void* calloc(size_t size)
360
if ((ptr=alloc_root(mem_root,size)))
361
memset(ptr, 0, size);
364
inline char *strdup(const char *str)
365
{ return strdup_root(mem_root,str); }
366
inline char *strmake(const char *str, size_t size)
367
{ return strmake_root(mem_root,str,size); }
368
inline void *memdup(const void *str, size_t size)
369
{ return memdup_root(mem_root,str,size); }
370
inline void *memdup_w_gap(const void *str, size_t size, uint32_t gap)
373
if ((ptr= alloc_root(mem_root,size+gap)))
374
memcpy(ptr,str,size);
384
338
@brief State of a single command executed against this connection.