1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fix for bug#28666 CREATE EVENT ... EVERY 0 SECOND let server crash

A missing check for zero value of interval was added.
This commit is contained in:
andrey@whirlpool.mysql.com
2007-05-25 14:46:22 +02:00
parent 7db7a83f94
commit 47c0c5a0ee
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);