mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/50
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user