Description:
The code example in the section "10.1 Overview of the C API Binary Log Interface" of MySQL Connector/C uses mysql_query(mysql, "SET @source_binlog_checksum='ALL'") to make the server takes as an indication that the client is checksum-aware. However, this code is not consistent with the one the mysqlbinlog uses. In mysqlbinlog application, it uses mysql_query(mysql,"SET @master_binlog_checksum = 'NONE', @source_binlog_checksum = 'NONE'"). The inconsistency is very confusing for people who want to use the Connector/C binary log interface, as the code in mysqlbinlog works well, while the one described in the document may not work in some cases.
How to repeat:
I write a program using exactly the code of the documentation. It returns what(): Slave can not handle replication events with the checksum that master is configured to log; the first event '' at 4, the last event read from './binlog.000001' at 125, the last byte read from './binlog.000001' at 125.
Using the code of mysqlbinlog, it just works.
Suggested fix:
Rewrite the documentation. Change the "SET @source_binlog_checksum='ALL'" to "SET @master_binlog_checksum = 'NONE', @source_binlog_checksum = 'NONE'".