diff options
author | unknown <monty@mysql.com> | 2004-11-09 03:58:44 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-11-09 03:58:44 +0200 |
commit | d4f78009e268ec70f2a859daa1b6dbe83c6cd1dd (patch) | |
tree | 7557a3bb8550c387349bc97e96a2a76d71c3ee52 /sql/parse_file.cc | |
parent | c6194d17784c1a6040279a8dd004d5ea72afcb6a (diff) | |
download | mariadb-git-d4f78009e268ec70f2a859daa1b6dbe83c6cd1dd.tar.gz |
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.
mysql-test/t/range.test:
After merge fixRecR
sql/item_func.cc:
After merge fix
sql/item_sum.cc:
After merge fix
sql/opt_range.cc:
After merge fix
sql/parse_file.cc:
After merge fix
sql/sp.cc:
After merge fix
sql/sp_head.cc:
After merge fix
sql/sp_head.h:
After merge fix
sql/sql_base.cc:
After merge fix
sql/sql_class.h:
After merge fix
sql/sql_list.h:
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.
sql/sql_prepare.cc:
After merge fix
sql/sql_select.cc:
After merge fix
sql/sql_table.cc:
After merge fix
Fixed problem with OPTIMIZE on INNODB tables
sql/sql_trigger.cc:
After merge fix
sql/sql_union.cc:
After merge fix
sql/sql_view.cc:
After merge fix
sql/sql_yacc.yy:
After merge fix
sql/table.cc:
After merge fix
Diffstat (limited to 'sql/parse_file.cc')
-rw-r--r-- | sql/parse_file.cc | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/sql/parse_file.cc b/sql/parse_file.cc index f548c16d808..c3043ed2c73 100644 --- a/sql/parse_file.cc +++ b/sql/parse_file.cc @@ -608,15 +608,13 @@ parse_quoted_escaped_string(char *ptr, char *end, my_bool File_parser::parse(gptr base, MEM_ROOT *mem_root, - struct File_option *parameters, uint required) + struct File_option *parameters, uint required) { uint first_param= 0, found= 0; register char *ptr= start; char *eol; LEX_STRING *str; - MEM_ROOT *sql_mem; List<LEX_STRING> *list; - bool change_mem; DBUG_ENTER("File_parser::parse"); while (ptr < end && found < required) @@ -720,18 +718,7 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root, } case FILE_OPTIONS_STRLIST: { - /* - TODO: remove play with mem_root, when List will be able - to store MEM_ROOT* pointer for list elements allocation - FIXME: we can't handle empty lists - */ - sql_mem= my_pthread_getspecific_ptr(MEM_ROOT*, THR_MALLOC); - list= (List<LEX_STRING>*)(base + parameter->offset); - if ((change_mem= (sql_mem != mem_root))) - { - change_mem= 1; - my_pthread_setspecific_ptr(THR_MALLOC, mem_root); - } + list= (List<LEX_STRING>*)(base + parameter->offset); list->empty(); // list parsing @@ -739,7 +726,7 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root, { if (!(str= (LEX_STRING*)alloc_root(mem_root, sizeof(LEX_STRING))) || - list->push_back(str)) + list->push_back(str, mem_root)) goto list_err; if(!(ptr= parse_quoted_escaped_string(ptr, end, mem_root, str))) goto list_err_w_message; @@ -754,20 +741,15 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root, goto list_err_w_message; } } - end_of_list: + end_of_list: if (*(ptr++) != '\n') goto list_err; - - if (change_mem) - my_pthread_setspecific_ptr(THR_MALLOC, sql_mem); break; list_err_w_message: my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0), parameter->name.str, line); list_err: - if (change_mem) - my_pthread_setspecific_ptr(THR_MALLOC, sql_mem); DBUG_RETURN(TRUE); } default: |