fix for bug 16408 (Events: crash for an event in a procedure)

(one patch)


mysql-test/r/events_bugs.result:
  fix for bug 16408
mysql-test/t/events_bugs.test:
  fix for bug 16408
sql/event.h:
  fix for bug 16408
sql/event_timed.cc:
  fix for bug 16408
sql/sql_parse.cc:
  fix for bug 16408
sql/sql_yacc.yy:
  fix for bug 16408
This commit is contained in:
unknown 2006-03-16 13:14:40 +01:00
commit 06dd976419
6 changed files with 99 additions and 18 deletions

View file

@ -1228,12 +1228,12 @@ Event_timed::change_security_context(THD *thd, Security_context *s_ctx,
definer_host.str, dbname.str))
{
my_error(ER_NO_SUCH_USER, MYF(0), definer_user.str, definer_host.str);
DBUG_RETURN(TRUE);
DBUG_RETURN(true);
}
*backup= thd->security_ctx;
thd->security_ctx= s_ctx;
#endif
DBUG_RETURN(FALSE);
DBUG_RETURN(false);
}
@ -1368,7 +1368,8 @@ Event_timed::compile(THD *thd, MEM_ROOT *mem_root)
ret= 0;
done:
lex.et->free_sphead_on_delete= false;
delete lex.et;
lex.et->deinit_mutexes();
lex_end(&lex);
DBUG_PRINT("note", ("return old data on its place. set back NAMES"));