mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 11:45:32 +00:00
Fix for bug#28666 CREATE EVENT ... EVERY 0 SECOND let server crash
A missing check for zero value of interval was added. mysql-test/r/events_bugs.result: update result file mysql-test/t/events_bugs.test: add test case for bug#28666 CREATE EVENT ... EVERY 0 SECOND let server crash sql/event_data_objects.cc: add a missing check about zero value for interval
This commit is contained in:
@ -413,7 +413,8 @@ Event_parse_data::init_interval(THD *thd)
|
||||
default:
|
||||
;/* these are the microsec stuff */
|
||||
}
|
||||
if (interval_tmp.neg || expression > EVEX_MAX_INTERVAL_VALUE)
|
||||
if (interval_tmp.neg || expression == 0 ||
|
||||
expression > EVEX_MAX_INTERVAL_VALUE)
|
||||
{
|
||||
my_error(ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG, MYF(0));
|
||||
DBUG_RETURN(EVEX_BAD_PARAMS);
|
||||
|
Reference in New Issue
Block a user