diff options
-rw-r--r-- | sql/sql_lex.cc | 7 | ||||
-rw-r--r-- | sql/sql_lex.h | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 3cbfd96b6aa..86219abc632 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -178,11 +178,8 @@ void lex_start(THD *thd, uchar *buf,uint length) lex->trg_table= NULL; lex->proc_list.first= 0; - extern byte *sp_lex_spfuns_key(const byte *ptr, uint *plen, my_bool first); - hash_free(&lex->spfuns); - hash_init(&lex->spfuns, system_charset_info, 0, 0, 0, - sp_lex_spfuns_key, 0, 0); - + if (lex->spfuns.records) + hash_reset(&lex->spfuns); } void lex_end(LEX *lex) diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 2bdc35f35cb..c8b4faa47c2 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -758,7 +758,8 @@ typedef struct st_lex st_lex() :result(0) { - bzero((char *)&spfuns, sizeof(spfuns)); + extern byte *sp_lex_spfuns_key(const byte *ptr, uint *plen, my_bool first); + hash_init(&spfuns, system_charset_info, 0, 0, 0, sp_lex_spfuns_key, 0, 0); } ~st_lex() |