Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
493 views
in Technique[技术] by (71.8m points)

mysqlbinlog - MariaDB 10.2.10 writing double binlog entries in mixed format

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...