Hello.


Use OPTIMIZE NO_WRITE_TO_BINLOG syntax. See:

  http://dev.mysql.com/doc/mysql/en/optimize-table.html







"Mike Debnam" <[EMAIL PROTECTED]> wrote:

> I issued a optimize table statement on my master which failed with a "lock

> wait timeout" message due to some competing queries running at the same

> time.

> 

> Now the statement has been replicated to my slaves, and it completes

> successfully. However it's killing the slave input thread with the

> following message in my error log:

> 

> 050208 15:10:38 [ERROR] Slave: Query caused different errors on master and

> slave. Error on master: 'Lock wait timeout exceeded; try restarting

> transaction' (1205), Error on slave: 'no error' (0). Default database:

> 'MyDB'. Query: 'optimize table My_Table', Error_code: 0

> 050208 15:10:38 [ERROR] Error running query, slave SQL thread aborted. Fix

> the problem, and restart the slave SQL thread with "SLAVE START". We

> stopped at log 'db-bin.000340' position 73609938

> 

> What's the correct way to work around this? I don't mind if the optimize

> table statement is skipped on the slaves. I just want replication to

> continue.

> 

> MySQL versions 4.1.7 on the master, 4.1.9 on the slave.

> 

> Thanks.

> 

> Mike

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to