1707
MySQLWARNINGCriticalTriggersHIGH confidence

Trigger does not have CREATED attribute in its definition

Production Risk

Low — trigger functions correctly; only metadata is missing.

What this means

A trigger definition read from an older server version does not include the CREATED timestamp attribute introduced in MySQL 5.7.2. The trigger still works but lacks creation metadata.

Why it happens
  1. 1Triggers created on MySQL 5.7.1 or earlier were migrated to a newer server without being recreated.
How to reproduce
trigger — this will error
trigger — this will error
SHOW TRIGGERS FROM mydb;

expected output

Warning (Code 1707): Trigger does not have CREATED attribute.

Fix

Recreate the trigger to add the CREATED attribute

Recreate the trigger to add the CREATED attribute
SHOW CREATE TRIGGER my_trigger;
DROP TRIGGER my_trigger;
-- Re-execute the CREATE TRIGGER statement shown above.

Why this works

Dropping and recreating the trigger causes MySQL to record the CREATED timestamp.

Sources
Official documentation ↗

MySQL 8.0 — 1707 ER_WARN_TRIGGER_DOESNT_HAVE_CREATED

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

← All MySQL errors