diff options
-rw-r--r-- | sql/event_data_objects.cc | 1 | ||||
-rw-r--r-- | sql/event_data_objects.h | 2 | ||||
-rw-r--r-- | sql/event_queue.cc | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 4100a031c91..4e5137d3ee1 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -178,6 +178,7 @@ Event_queue_element_for_exec::init(LEX_STRING db, LEX_STRING n) if (!(name.str= my_strndup(n.str, name.length= n.length, MYF(MY_WME)))) { my_free(dbname.str); + dbname.str= NULL; return TRUE; } return FALSE; diff --git a/sql/event_data_objects.h b/sql/event_data_objects.h index 0acf301ef5a..41626004100 100644 --- a/sql/event_data_objects.h +++ b/sql/event_data_objects.h @@ -33,7 +33,7 @@ struct TABLE; class Event_queue_element_for_exec { public: - Event_queue_element_for_exec(){}; + Event_queue_element_for_exec() : dbname{NULL, 0}, name{NULL, 0} {}; ~Event_queue_element_for_exec(); bool diff --git a/sql/event_queue.cc b/sql/event_queue.cc index 904efe26f36..4398b650fd7 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -635,6 +635,7 @@ Event_queue::get_top_for_execution_if_time(THD *thd, if (!(*event_name= new Event_queue_element_for_exec()) || (*event_name)->init(top->dbname, top->name)) { + delete *event_name; ret= TRUE; break; } |