MySQL Forums
Forum List  »  Replication

Mysql slave failed to execute DELETE randomly
Posted by: KEOU CHAO
Date: January 28, 2015 08:56PM

Hi,

I am having a random problem - mysql slave failed to execute a delete statement randomly. It is on Ubuntu 10.04 LTS, mysql version 5.1.73, mysql with radius DB.

This happen randomly on DELETE or UPDATE, the failed ratio is less then 1 out of 10 times. I would like to get any direction as what I should check, any debug information I can get to help find the root cause.

Following is an example -

A record on the master was deleted from the mysql workbench 6.0, but not on the slave DB; the mysql.log from master shows the delete statement as -

122731 Query SELECT * FROM radius.usergroup order by username
122731 Query SHOW KEYS FROM `radius`.`usergroup`
122731 Query SHOW DATABASES LIKE 'radius'
122731 Query SHOW TABLES FROM `radius` LIKE 'usergroup'
122731 Query SELECT * FROM `radius`.`usergroup` WHERE 0=1
122731 Query SHOW FULL COLUMNS FROM `radius`.`usergroup` LIKE 'id'
122731 Query set autocommit=1
150126 15:12:39 122731 Query SELECT * FROM radius.radcheck order by username
122731 Query SHOW KEYS FROM `radius`.`radcheck`
122731 Query SHOW DATABASES LIKE 'radius'
122731 Query SHOW TABLES FROM `radius` LIKE 'radcheck'
122731 Query SELECT * FROM `radius`.`radcheck` WHERE 0=1
122731 Query SHOW FULL COLUMNS FROM `radius`.`radcheck` LIKE 'id'
122731 Query set autocommit=0
150126 15:13:04 122731 Prepare DELETE FROM `radius`.`radcheck` WHERE `id`='27958'
122731 Execute DELETE FROM `radius`.`radcheck` WHERE `id`='27958'
122731 Query commit
122731 Close stmt

The slave relay logs show the statement -

# at 2583127
#150126 15:13:04 server id 1 end_log_pos 2583091 Query thread_id=122731 exec_time=0 error_code=0
SET TIMESTAMP=1422303184/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
DELETE FROM `radius`.`radcheck` WHERE `id`='27958'
/*!*/;

Thanks in advanced, KeOu

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysql slave failed to execute DELETE randomly
1834
January 28, 2015 08:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.