Bug #119558 SHOW BINLOG EVENTS fails with Event too big
Submitted: 16 Dec 8:39 Modified: 16 Dec 8:57
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:8.4.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: binary log, binlog

[16 Dec 8:39] Daniël van Eeden
Description:
With some really big events the `SHOW BINARY LOGS` command fails.

mysql-8.4.7 [test]> SHOW BINARY LOGS;
+---------------+------------+-----------+
| Log_name      | File_size  | Encrypted |
+---------------+------------+-----------+
| binlog.000001 | 1269838321 | No        |
| binlog.000002 |        198 | No        |
+---------------+------------+-----------+
2 rows in set (0.001 sec)

mysql-8.4.7 [test]> SHOW BINLOG EVENTS IN 'binlog.000001';
ERROR 1220 (HY000): Error when executing command SHOW BINLOG EVENTS: Error reading Log_event at position 812: Failed decoding event: Event too big

How to repeat:
This is with max_allowed_packet_size and max_binlog_size set to their maximum values.

Note that `mysqlbinlog` 9.5.0 is able to read the file. I didn't try with the 8.4 version of `mysqlbinlog`.

The last events were row based events from `INSERT INTO t(c1) SELECT c1 FROM t`. This is an InnoDB table with a biging autoinc PK and a longtext field.
[16 Dec 8:57] Daniël van Eeden
Some more info:

$ mysqlbinlog --start-position=812 binlog.000001 | grep -A1 'at 812' | head -2
# at 812
#251216  9:19:33 server id 1  end_log_pos 2600860 CRC32 0x560612f7 	Write_rows: table id 120 flags: STMT_END_F