3132
MariaDBERRORNotableReplicationHIGH confidence
sql_slave_skip_counter cannot be set when GTID mode is ON
Production Risk
High — skipping transactions can cause data drift between source and replica.
What this means
The sql_slave_skip_counter system variable cannot be set when GTID-based replication is enabled because GTIDs manage transaction ordering; skipping by count is not meaningful with GTIDs.
Why it happens
- 1SET GLOBAL sql_slave_skip_counter issued while gtid_mode=ON.
How to reproduce
trigger — this will error
trigger — this will error
SET GLOBAL sql_slave_skip_counter = 1; -- with gtid_mode = ON
expected output
ERROR 3132 (HY000): sql_slave_skip_counter is not supported when @@GLOBAL.GTID_MODE = ON.
Fix
Inject an empty transaction to skip a GTID
Inject an empty transaction to skip a GTID
SET GTID_NEXT = 'source_uuid:N'; BEGIN; COMMIT; SET GTID_NEXT = 'AUTOMATIC';
Why this works
Marks the problematic GTID as already applied without executing the event.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3132 ER_SQL_SLAVE_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE2
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev