summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/sql_parse.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 829d99f448d..f0aa90fa84f 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3972,6 +3972,7 @@ end_with_restore_list:
}
case SQLCOM_CREATE_EVENT:
case SQLCOM_ALTER_EVENT:
+ do
{
DBUG_ASSERT(lex->event_parse_data);
if (lex->table_or_sp_used())
@@ -3997,16 +3998,15 @@ end_with_restore_list:
if (!res)
send_ok(thd);
- /* Don't do it, if we are inside a SP */
- if (!thd->spcont)
- {
- delete lex->sphead;
- lex->sphead= NULL;
- }
-
- /* lex->unit.cleanup() is called outside, no need to call it here */
- break;
+ } while (0);
+ /* Don't do it, if we are inside a SP */
+ if (!thd->spcont)
+ {
+ delete lex->sphead;
+ lex->sphead= NULL;
}
+ /* lex->unit.cleanup() is called outside, no need to call it here */
+ break;
case SQLCOM_DROP_EVENT:
case SQLCOM_SHOW_CREATE_EVENT:
{