Commit bbd7277f authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

Bug #44171 KILL ALTER EVENT can crash the server

This assert could be triggered if ALTER EVENT failed to load the
event after altering it. Failing to load the event could for 
example happen because of KILL QUERY.

The assert tested that the result of a failed load_named_event()
was OP_LOAD_ERROR. However since load_named_event() returns bool,
this assert did not make any sense. This patch therefore removes
the assert, fixing the problem. The patch also removes 
enum_events_error_code since it was unused.

No test case added. The bug fix is trivial and this bug was
easily detected by RQG tests. Further, adding a MTR test case
for this bug would require adding sync points to make the
test case repeatable.
parent 17b36879
......@@ -485,10 +485,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data,
ret= TRUE; // OOM
else if ((ret= db_repository->load_named_event(thd, dbname, name,
new_element)))
{
DBUG_ASSERT(ret == OP_LOAD_ERROR);
delete new_element;
}
else
{
/*
......
......@@ -44,19 +44,6 @@ class THD;
typedef class Item COND;
typedef struct charset_info_st CHARSET_INFO;
/* Return codes */
enum enum_events_error_code
{
OP_OK= 0,
OP_NOT_RUNNING,
OP_CANT_KILL,
OP_CANT_INIT,
OP_DISABLED_EVENT,
OP_LOAD_ERROR,
OP_ALREADY_EXISTS
};
int
sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment