List:General Discussion« Previous MessageNext Message »
From:Leo Date:December 30 2005 7:56am
Subject:Re: how use sql_slave_skip_counter to restore slave replication
View as plain text  
other than what Gleb says,
you can avoid the error using 'insert ignore into' or better yet 
'replace into'
for every insert statement

AESYS S.p.A. [Enzo Arlati] wrote:

>I'm trying to use teh parameter sql_slave_skip_counter at run-time to
>restore slave replication.
>When a slave replication broke due some errors in code, my be a duplicate
>key, the only working way to restore the replica where to delete the
>existing record which conflicts whith the ones inserted by the replication
>process.
>So if I have a duplicate key 30020 ,I have to remove the record with the id
>30020 and the replication can reinsert it's copy of record with id = 30020.
>This should be difficult to automate so I try another way using the global
>variable sql_slave_skip_counter.
>
>I try to skip 5 records using a statemente like this:
>set global sql_slave_skip_counter = 5;
>and then restart the slavre
>start slave;
>
>but the problem is the same and the command 'show slave status' report a
>skip_counter filed equals 0.
>
>Where I am wrong , some can help me ?
>Regards, Enzo
>
>  
>
Thread
how use sql_slave_skip_counter to restore slave replicationAESYS S.p.A. [Enzo Arlati]28 Dec
  • Re: how use sql_slave_skip_counter to restore slave replicationGleb Paharenko30 Dec
    • R: how use sql_slave_skip_counter to restore slave replicationAESYS S.p.A. [Enzo Arlati]30 Dec
      • Re: R: how use sql_slave_skip_counter to restore slave replicationGleb Paharenko30 Dec
  • Re: how use sql_slave_skip_counter to restore slave replicationLeo30 Dec
    • Re: how use sql_slave_skip_counter to restore slave replicationsheeri kritzer9 Jan
      • R: how use sql_slave_skip_counter to restore slave replicationAESYS S.p.A. [Enzo Arlati]10 Jan
        • Re: R: how use sql_slave_skip_counter to restore slave replicationGleb Paharenko10 Jan