patternMinor
MariaDB Multi-source Replication SQL_SLAVE_SKIP_COUNTER
Viewed 0 times
sql_slave_skip_countermultisourcereplicationmariadb
Problem
When an error occurs on a slave while executing a statement from the master, it is sometimes useful to use SQL_SLAVE_SKIP_COUNTER variable to skip the execution of the query, like this:
While this works for main replication thread, I wonder how this is possible on a MariaDB Multi-source replication thread?
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
START SLAVE;While this works for main replication thread, I wonder how this is possible on a MariaDB Multi-source replication thread?
Solution
Change the default_master_connection variable for the session to make it work for a specific multi-source connection:
STOP SLAVE 'src1';
SET @@default_master_connection = 'src1';
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
START SLAVE 'src1';
SET @@default_master_connection = '';Code Snippets
STOP SLAVE 'src1';
SET @@default_master_connection = 'src1';
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
START SLAVE 'src1';
SET @@default_master_connection = '';Context
StackExchange Database Administrators Q#104319, answer score: 6
Revisions (0)
No revisions yet.