Commit 66434a6c authored by unknown's avatar unknown

Two small fixes to make -debug version usable again.


include/my_sys.h:
  Temporaly reverting Monty's optimization of clear_alloc_root() since it makes -debug server
  unusable.
sql/sql_select.cc:
  After merge fix. Now deletion is done outside of handle_select().
  (We fixed the same issue with deletion of LEX::result in 4.1 for prepared statements
   but in more general way).
parent edb9559f
......@@ -738,7 +738,7 @@ extern void my_free_lock(byte *ptr,myf flags);
#define my_free_lock(A,B) my_free((A),(B))
#endif
#define alloc_root_inited(A) ((A)->min_malloc != 0)
#define clear_alloc_root(A) { (A)->free= (A)->used= (A)->pre_alloc= 0; }
#define clear_alloc_root(A) bzero((void *) (A), sizeof(MEM_ROOT))
extern void init_alloc_root(MEM_ROOT *mem_root, uint block_size,
uint pre_alloc_size);
extern gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size);
......
......@@ -232,8 +232,6 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
result->abort();
res= 1; // Error sent to client
}
if (result != lex->result)
delete result;
DBUG_RETURN(res);
}
......
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