|
上周同步报Last_SQL_Error: Could not execute Update_rows event on table my_db.tmp_tbl_order_sub120110; Can't find record in 'tmp_tbl_order_sub120110', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log mysql-bin.000148, end_log_pos 342300316
根据错误信息查binlog,发现出错的sql是:
update tmp_tbl_order_sub120110 set union_trace_code=replace(union_trace_code,'=>','`'),anm_uuid=replace(uuid(),'-','');
这个引起的,当时以为tmp_tbl_order_sub120110 主从数据不一致造成的,但我比对了下,发觉一模一样,我的binlog_format=mixed,binlog里这个sql采用row event,一条条的记录update。
我觉得这应该算是mysql的一个bug,我把binlog_format=statement就不会报错,至今不大理解mixed情况下,mysql怎么判断有些sql用statement event,有些sql用row event,不知道如何规避这个1032错误
|
|