MariaDB 10.2.10 writing double binlog entries in mixed format

不打扰是莪最后的温柔 提交于 2019-12-24 21:28:31

问题


I am using MariaDB 10.2.10 under Debian 9 in Master/Slave replication. I am experiencing problems with replication since the slave is refusing replication due to 1062 duplicate key errors.

After a long time of investigation I found, that the binlog of the master contains the same INSERT statement twice. It is written in statement AND row based format. binlog_format is set to MIXED.

I had a look at general log - the INSERT statement was only commited once.

Heres the outpout of mysqlbinlog:

# at 11481089
#171205 10:22:37 server id 126  end_log_pos 11481132 CRC32 0x73b0f77c   
                 Write_rows: table id 22683990 flags: STMT_END_F
### INSERT INTO `mydb`.`document_reference`
### SET
###   @1=30561
###   @2=6
###   @3=0

# at 11481132
#171205 10:22:37 server id 126  end_log_pos 11481387 CRC32 0x599e2b04       
                 Query   thread_id=3282752       exec_time=0     error_code=0
SET TIMESTAMP=1512465757/*!*/;
INSERT INTO document_reference 
(document_reference_document_id, document_reference_type, document_reference_value) 
VALUES (30561, "single", 0)
/*!*/;
# at 11481387
#171205 10:22:37 server id 126  end_log_pos 11481418 CRC32 0x73fe1166   Xid = 248234294
COMMIT/*!*/;

Anyone has an idea, why this statement is written twice to the binlog?

来源:https://stackoverflow.com/questions/47650166/mariadb-10-2-10-writing-double-binlog-entries-in-mixed-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!