1550
MariaDBERRORNotableEventsHIGH confidence
Event end date is before start date
Production Risk
Low — DDL error; the event will not be created.
What this means
ER_EVENT_ENDS_BEFORE_STARTS (1550, SQLSTATE HY000) is raised when the END datetime specified for an event is earlier than or equal to the START datetime.
Why it happens
- 1EVENT ... STARTS date ENDS earlier_date where ENDS < STARTS
- 2Typo or logic error in the event schedule dates
How to reproduce
trigger — this will error
trigger — this will error
CREATE EVENT my_event ON SCHEDULE EVERY 1 HOUR STARTS '2024-12-31 23:00:00' ENDS '2024-01-01 00:00:00' -- ENDS before STARTS DO SELECT 1;
expected output
ERROR 1550 (HY000): Events in DISABLE ON SLAVE status can not be altered
Fix
Ensure ENDS is after STARTS
Ensure ENDS is after STARTS
CREATE EVENT my_event ON SCHEDULE EVERY 1 HOUR STARTS '2024-01-01 00:00:00' ENDS '2024-12-31 23:59:59' -- ENDS after STARTS DO SELECT 1;
Why this works
The event END timestamp must be chronologically after the START timestamp.
Sources
Official documentation ↗
MySQL 8.0 — 1550 ER_EVENT_ENDS_BEFORE_STARTS
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev