Bug #82900 Discrepancy in sync_binlog parameter documentation
Submitted: 8 Sep 2016 6:18 Modified: 15 Sep 2016 15:00
Reporter: Ashudeep Sharma Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: binlog, database-replication, innodb, mysql-parameter

[8 Sep 2016 6:18] Ashudeep Sharma
Description:
I was going through the documentation for sync_binlog parameter and found a discrepancy in sync_binlog parameter documentation. 

The documentation here http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_sync_bin... says: 

A value of 1 is the safest choice because in the event of a crash you lose at most one commit group from the binary log. 

which essentially means that the data will be updated but might not be there in the binlogs. 

However,in the binary log documentation here http://dev.mysql.com/doc/refman/5.6/en/binary-log.html says: 

For example, if you are using InnoDB tables and the MySQL server processes a COMMIT statement, it writes many prepared transactions to the binary log in sequence, synchronizes the binary log, and then commits this transaction into InnoDB. If the server crashes between those two operations, the transaction is rolled back by InnoDB at restart but still exists in the binary log. 

which essentially means that the transaction is first written in binlog and then committed to the InnoDB, so there is a chance that in case of crash the row is there in the binlog but doesn;t exist in the Database.

The two statements are contradictory, i am also not sure which one of them is correct.
I have also asked this on mysql forum: http://forums.mysql.com/read.php?12,650163,650163#msg-650163
still waiting for the response.

How to repeat:
This is a documentation issue, please read the following links:

 http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_sync_bin...

http://dev.mysql.com/doc/refman/5.6/en/binary-log.html

Suggested fix:
Correct the Documentation
[8 Sep 2016 16:50] Rick James
Also discussed in http://stackoverflow.com/questions/39372545/sync-binlog-parameter-mysql (And I want to know if I said something incorrectly.)
[15 Sep 2016 15:00] MySQL Verification Team
Hi!

There is no discrepancy what so ever, since the last binary log position is written in InnoDB undo logs. This is explained in detail in the documentation on InnoDB.