1770
MariaDBERRORNotableReplicationHIGH confidence
GTID_NEXT is set to an undefined GTID
Production Risk
Medium — GTID inconsistency risk.
What this means
An attempt was made to commit a transaction while GTID_NEXT is set to a specific GTID, but the transaction was not executed or was already applied.
Why it happens
- 1SET GTID_NEXT to a specific GTID followed by no transaction or a BEGIN/COMMIT without DML.
- 2Attempting to inject a GTID that was already in gtid_executed.
How to reproduce
trigger — this will error
trigger — this will error
SET GTID_NEXT='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:1'; BEGIN; COMMIT; -- empty transaction after GTID_NEXT set to specific GTID
expected output
ERROR 1770 (HY000): GTID_NEXT is set to a specific GTID, but an empty transaction was committed.
Fix
Reset GTID_NEXT to AUTOMATIC after injecting an empty transaction
Reset GTID_NEXT to AUTOMATIC after injecting an empty transaction
SET GTID_NEXT = 'AUTOMATIC';
Why this works
Returns GTID assignment to the normal automatic mode.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 1770 ER_GTID_NEXT_TYPE_UNDEFINED_GTID
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev