mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into whirlpool.mysql.com:/work/mysql-5.1-runtime
This commit is contained in:
commit
1f5f609ae8
3 changed files with 69 additions and 1 deletions
|
@ -528,4 +528,33 @@ DROP EVENT e3;
|
|||
DROP EVENT e2;
|
||||
DROP EVENT e1;
|
||||
SET TIME_ZONE=@save_time_zone;
|
||||
drop event if exists new_event;
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY 0 SECOND DO SELECT 1;
|
||||
ERROR HY000: INTERVAL is either not positive or too big
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT 0) SECOND DO SELECT 1;
|
||||
ERROR HY000: INTERVAL is either not positive or too big
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY "abcdef" SECOND DO SELECT 1;
|
||||
ERROR HY000: INTERVAL is either not positive or too big
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY "0abcdef" SECOND DO SELECT 1;
|
||||
ERROR HY000: INTERVAL is either not positive or too big
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY "a1bcdef" SECOND DO SELECT 1;
|
||||
ERROR HY000: INTERVAL is either not positive or too big
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT "abcdef" UNION SELECT "abcdef") SECOND DO SELECT 1;
|
||||
ERROR HY000: INTERVAL is either not positive or too big
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT "0abcdef") SECOND DO SELECT 1;
|
||||
ERROR HY000: INTERVAL is either not positive or too big
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT "a1bcdef") SECOND DO SELECT 1;
|
||||
ERROR HY000: INTERVAL is either not positive or too big
|
||||
CREATE EVENT new_event ON SCHEDULE AT "every day" DO SELECT 1;
|
||||
ERROR HY000: Incorrect AT value: 'every day'
|
||||
CREATE EVENT new_event ON SCHEDULE AT "0every day" DO SELECT 1;
|
||||
ERROR HY000: Incorrect AT value: '0every day'
|
||||
CREATE EVENT new_event ON SCHEDULE AT (SELECT "every day") DO SELECT 1;
|
||||
ERROR HY000: Incorrect AT value: 'every day'
|
||||
CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() DO SELECT 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STARTS NOW() DO SELECT 1' at line 1
|
||||
CREATE EVENT new_event ON SCHEDULE AT NOW() ENDS NOW() DO SELECT 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ENDS NOW() DO SELECT 1' at line 1
|
||||
CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() ENDS NOW() DO SELECT 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STARTS NOW() ENDS NOW() DO SELECT 1' at line 1
|
||||
drop database events_test;
|
||||
|
|
|
@ -610,6 +610,44 @@ DROP EVENT e1;
|
|||
|
||||
SET TIME_ZONE=@save_time_zone;
|
||||
|
||||
#
|
||||
# START - BUG#28666 CREATE EVENT ... EVERY 0 SECOND let server crash
|
||||
#
|
||||
--disable_warnings
|
||||
drop event if exists new_event;
|
||||
--enable_warnings
|
||||
--error ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY 0 SECOND DO SELECT 1;
|
||||
--error ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT 0) SECOND DO SELECT 1;
|
||||
--error ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY "abcdef" SECOND DO SELECT 1;
|
||||
--error ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY "0abcdef" SECOND DO SELECT 1;
|
||||
--error ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY "a1bcdef" SECOND DO SELECT 1;
|
||||
|
||||
--error ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT "abcdef" UNION SELECT "abcdef") SECOND DO SELECT 1;
|
||||
--error ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT "0abcdef") SECOND DO SELECT 1;
|
||||
--error ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG
|
||||
CREATE EVENT new_event ON SCHEDULE EVERY (SELECT "a1bcdef") SECOND DO SELECT 1;
|
||||
|
||||
--error ER_WRONG_VALUE
|
||||
CREATE EVENT new_event ON SCHEDULE AT "every day" DO SELECT 1;
|
||||
--error ER_WRONG_VALUE
|
||||
CREATE EVENT new_event ON SCHEDULE AT "0every day" DO SELECT 1;
|
||||
--error ER_WRONG_VALUE
|
||||
CREATE EVENT new_event ON SCHEDULE AT (SELECT "every day") DO SELECT 1;
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() DO SELECT 1;
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE EVENT new_event ON SCHEDULE AT NOW() ENDS NOW() DO SELECT 1;
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE EVENT new_event ON SCHEDULE AT NOW() STARTS NOW() ENDS NOW() DO SELECT 1;
|
||||
|
||||
#
|
||||
# End of tests
|
||||
#
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue