diff options
author | unknown <tsmith@quadxeon.mysql.com> | 2007-03-08 00:02:41 +0100 |
---|---|---|
committer | unknown <tsmith@quadxeon.mysql.com> | 2007-03-08 00:02:41 +0100 |
commit | e7362d5c32e4c8dc606021bc061da31e02167127 (patch) | |
tree | 2ce64e9d56f5de3dddd59bd4ad2f070e65b8a880 /sql/sql_parse.cc | |
parent | 9baec3334095fba0fcd1bf571efdc7ccc0692300 (diff) | |
parent | d203b18ee46024cf5674a494b559786f15568295 (diff) | |
download | mariadb-git-e7362d5c32e4c8dc606021bc061da31e02167127.tar.gz |
Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/51
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index dcd01af6efc..33209b6e023 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3685,9 +3685,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); @@ -4063,9 +4060,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: @@ -5219,12 +5213,7 @@ void mysql_parse(THD *thd, char *inBuf, uint length) else #endif { - if (thd->net.report_error) - { - delete lex->sphead; - lex->sphead= NULL; - } - else + if (! thd->net.report_error) { /* Binlog logs a string starting from thd->query and having length @@ -5244,7 +5233,6 @@ void mysql_parse(THD *thd, char *inBuf, uint length) query_cache_end_of_result(thd); } } - lex->unit.cleanup(); } else { @@ -5252,19 +5240,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 (lex->sphead) - { - /* Clean up after failed stored procedure/function */ - delete lex->sphead; - 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(); |