首先启动一个事务,事务中包含对表A的操作,事务未提交时,在另外的session中讲表A删除,成功后将事务提交,记录如binlog的顺序为先删除然后才是事务,导致主从同步卡死:
#111014 5:43:24 server id 150090000 end_log_pos 610652822 Query thread_id=8630665 exec_time=1 error_code=0
drop table if exists list_time/*!*/;
#111014 5:43:25 server id 150090000 end_log_pos 610652894 Query thread_id=8630641 exec_time=0 error_code=0
BEGIN/*!*/;
--
DELETE FROM list_down WHERE doc_id=63368727/*!*/;
#111014 5:43:24 server id 150090000 end_log_pos 610655179 Query thread_id=8630641 exec_time=0 error_code=0
DELETE FROM list_time WHERE doc_id=63368727/*!*/;
#111014 5:43:24 server id 150090000 end_log_pos 610655310 Query thread_id=8630641 exec_time=0 error_code=0
UPDATE udoc6 SET main_status= 3,ishide = 0 WHERE doc_id=63368727/*!*/;
--
COMMIT/*!*/;
#111014 5:43:25 server id 150090000 end_log_pos 610656089 Query thread_id=8630665 exec_time=0 error_code=0
alter table list_time_bak rename list_time/*!*/;
bug参见:
分析过程:在从库全日志中找出主从同步的id号,过滤出所有的相关记录,与同时间段内binlog比较
阅读(1901) | 评论(0) | 转发(0) |