diff options
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 598f131985c..bd36880433f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4182,12 +4182,14 @@ void mysql_parse(THD *thd, char *inBuf, uint length) query_cache_end_of_result(thd); } } + lex->unit.cleanup(); } else { DBUG_PRINT("info",("Command aborted. Fatal_error: %d", thd->is_fatal_error)); query_cache_abort(&thd->net); + lex->unit.cleanup(); if (thd->lex->sphead) { /* Clean up after failed stored procedure/function */ |