Bug #91960 MySQL 5.7 mysqlbinlog fails with compression protocol enabled
Submitted: 10 Aug 2018 9:23 Modified: 10 Aug 2018 12:28
Reporter: Nik Vyzas Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.7 OS:Ubuntu (16.04)
Assigned to: CPU Architecture:x86

[10 Aug 2018 9:23] Nik Vyzas
Description:
The mysqlbinlog utility fails to retrieve binlogs directly from a remote server when the compression protocol is enabled, the error returned is "ERROR: Could not construct log event object: Sanity check failed".

How to repeat:
# THIS WORKS:
$ /usr/bin/mysqlbinlog mysql-bin.132834 --raw --read-from-remote-server --stop-never --host 10.10.10.10  --port 3306

# THIS DOESNT WORK:
$ /usr/bin/mysqlbinlog mysql-bin.132834 --raw --read-from-remote-server --stop-never --host 10.10.10.10  --port 3306 --compress
ERROR: Could not construct log event object: Sanity check failed

Suggested fix:
Current workaround is to collect binlogs with compression protocol disabled
[10 Aug 2018 11:09] MySQL Verification Team
Hello Nik Vyzas,

Thank you for the report.
I assume that you are not using official binaries as there is no "--compress" option available: https://dev.mysql.com/doc/refman/5.7/en/mysqlbinlog.html

Thanks,
Umesh
[10 Aug 2018 12:28] Nik Vyzas
Ah ok, this is Percona mysql-client - I didn't realise it wasn't available in upstream.

Thanks for pointing this out - this can be closed.