1922
MariaDBERRORCommonDDLHIGH confidence

Same old and new event name

Production Risk

None — statement is rejected; existing event is unchanged.

What this means

ALTER EVENT ... RENAME TO was given the same name as the current event name, making the rename a no-op that MySQL rejects.

Why it happens
  1. 1ALTER EVENT my_event RENAME TO my_event — source and target names are identical.
How to reproduce
trigger — this will error
trigger — this will error
ALTER EVENT my_event RENAME TO my_event;

expected output

ERROR 1922 (HY000): Same old and new event name.

Fix

Provide a different target name

Provide a different target name
ALTER EVENT my_event RENAME TO my_event_v2;

Why this works

Supply a distinct name for the rename target.

Sources
Official documentation ↗

MySQL 8.0 — 1922 ER_EVENT_SAME_NAME2

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors