Error
Error Code:
1858
MariaDB Error 1858: SQL Slave Skip Counter in GTID Mode
Description
This error occurs when an attempt is made to set the `sql_slave_skip_counter` variable on a MariaDB replica server that is running with Global Transaction Identifiers (GTID) mode enabled (`@@GLOBAL.GTID_MODE = ON`). In GTID replication, skipping transactions requires a different approach than simply incrementing a counter.
Error Message
sql_slave_skip_counter can not be set when the server is running with @@GLOBAL.GTID_MODE = ON. Instead, for each transaction that you want to skip, generate an empty transaction with the same GTID as the transaction
Known Causes
3 known causesUsing `sql_slave_skip_counter` with GTID
The primary cause is attempting to use the `sql_slave_skip_counter` variable, which is incompatible with GTID-enabled replication setups.
Misunderstanding GTID Replication
Users might not be aware that GTID-based replication fundamentally changes how transactions are identified and skipped compared to traditional binary log position replication.
Legacy Automation Scripts
Existing scripts or tools designed for older MariaDB replication that used `sql_slave_skip_counter` will fail when executed against a GTID-enabled replica.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service