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:
unknown
2007-05-25 14:46:22 +02:00
parent 850eadadc6
commit b432f9c1e3
3 changed files with 69 additions and 1 deletions

View File

@ -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);