summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-11-09 15:50:33 +0200
committerunknown <monty@mysql.com>2004-11-09 15:50:33 +0200
commitcd16e4c9c750a5bddfcecaa849dc277445aeaa5b (patch)
tree0f79c123c0efaca52f38efd272c5021f0f271365 /sql/sql_lex.cc
parent8bddd448308a7de9d262665f49007ba5131ec076 (diff)
downloadmariadb-git-cd16e4c9c750a5bddfcecaa849dc277445aeaa5b.tar.gz
Simple optimization to avoid a malloc for each query
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc7
1 files changed, 2 insertions, 5 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)