summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <tsmith@quadxeon.mysql.com>2007-03-07 23:55:25 +0100
committerunknown <tsmith@quadxeon.mysql.com>2007-03-07 23:55:25 +0100
commit30c1622ec489569b3208b66de3d80d2b7ad9a33f (patch)
treee72037d23442a14def78a943ebb05c24b28beca4 /sql/sql_parse.cc
parent5501a2915a8b8f3b4598dd187cbe1acdbbdf2fd2 (diff)
parent4d6e16f284d9699307461b0081269bf4ce8be87e (diff)
downloadmariadb-git-30c1622ec489569b3208b66de3d80d2b7ad9a33f.tar.gz
Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/50 sql/mysqld.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_parse.cc: Auto merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc34
1 files changed, 7 insertions, 27 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 4cfedaac803..03c37e4dba9 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4517,9 +4517,6 @@ end_with_restore_list:
clean up the environment.
*/
create_sp_error:
- lex->unit.cleanup();
- delete lex->sphead;
- lex->sphead= 0;
if (sp_result != SP_OK )
goto error;
send_ok(thd);
@@ -4890,9 +4887,6 @@ create_sp_error:
/* Conditionally writes to binlog. */
res= mysql_create_or_drop_trigger(thd, all_tables, 1);
- /* We don't care about trigger body after this point */
- delete lex->sphead;
- lex->sphead= 0;
break;
}
case SQLCOM_DROP_TRIGGER:
@@ -5915,15 +5909,7 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
else
#endif
{
- if (thd->net.report_error)
- {
- if (thd->lex->sphead)
- {
- delete thd->lex->sphead;
- thd->lex->sphead= NULL;
- }
- }
- else
+ if (! thd->net.report_error)
{
/*
Binlog logs a string starting from thd->query and having length
@@ -5943,7 +5929,6 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
query_cache_end_of_result(thd);
}
}
- lex->unit.cleanup();
}
else
{
@@ -5951,19 +5936,14 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
DBUG_PRINT("info",("Command aborted. Fatal_error: %d",
thd->is_fatal_error));
- /*
- The first thing we do after parse error is freeing sp_head to
- ensure that we have restored original memroot.
- */
- if (thd->lex->sphead)
- {
- /* Clean up after failed stored procedure/function */
- delete thd->lex->sphead;
- thd->lex->sphead= NULL;
- }
query_cache_abort(&thd->net);
- lex->unit.cleanup();
}
+ if (thd->lex->sphead)
+ {
+ delete thd->lex->sphead;
+ thd->lex->sphead= 0;
+ }
+ lex->unit.cleanup();
thd->proc_info="freeing items";
thd->end_statement();
thd->cleanup_after_query();