mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
After merge fixes
Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root (Before one had to change thd->mem_root ; push_back(); restore mem_root.
This commit is contained in:
@ -89,7 +89,8 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
|
||||
|
||||
error=1;
|
||||
disk_buff=NULL;
|
||||
old_root= my_pthread_getspecific_ptr(MEM_ROOT*,THR_MALLOC);
|
||||
root_ptr= my_pthread_getspecific_ptr(MEM_ROOT**, THR_MALLOC);
|
||||
old_root= *root_ptr;
|
||||
|
||||
if ((file=my_open(fn_format(index_file, name, "", reg_ext,
|
||||
MY_UNPACK_FILENAME),
|
||||
@ -123,8 +124,6 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
|
||||
outparam->blob_ptr_size=sizeof(char*);
|
||||
outparam->db_stat = db_stat;
|
||||
init_sql_alloc(&outparam->mem_root, TABLE_ALLOC_BLOCK_SIZE, 0);
|
||||
root_ptr= my_pthread_getspecific_ptr(MEM_ROOT**, THR_MALLOC);
|
||||
old_root= *root_ptr;
|
||||
*root_ptr= &outparam->mem_root;
|
||||
|
||||
outparam->real_name=strdup_root(&outparam->mem_root,
|
||||
|
Reference in New Issue
Block a user