mysqlbinlog cannot read events with numbers, larger than 4G
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Triaged
|
High
|
Unassigned | |||
5.6 |
Triaged
|
High
|
Unassigned | |||
5.7 |
Triaged
|
High
|
Unassigned |
Bug Description
Even after fix for bug #74734 mysqlbinlog cannot read events with numbers, larger than 4G
How to repeat:
Create event, larger than 4G:
set binlog_
create table t1(f1 longtext);
insert into t1 values(repeat('a', 1073741824/2));
create table t2 like t1;
flush logs;
insert into t2 select f1 from t1 union all select f1 from t1 union all select f1 from t1 union all select f1 from t1 union all select f1 from t1 union all select f1 from t1 union all select f1 from t1 union all select f1 from t1;
Process binary log with mysqlbinlog using no options, it will succeed:
mysqlbinlog var/mysqld.
Now find all valied positions:
cat tmp.sql | grep -i at > tmp.sql.cr
cat tmp.sql.cr
# at 4
#150723 22:33:08 server id 1 end_log_pos 120 CRC32 0x62430c0b Start: binlog v 4, server v 5.6.25-
# at 120
/*!\C latin1 *//*!*/;
SET @@session.
SET @@session.
# at 192
# at 238
# at 536871190
# at 1073742142
# at 1610613094
# at 2147484046
# at 2684354998
# at 3221225950
# at 3758096902
# at 4294967854
# at 4294967927
#150723 22:33:11 server id 1 end_log_pos 679 CRC32 0xd83ecaea Rotate to master-bin.000003 pos: 4
Try to read binary log, starting from position 4294967854:
mysqlbinlog var/mysqld.
mysqlbinlog: [Warning] option 'start-position': unsigned value 4294967854 adjusted to 4294967295
ERROR: Error in Log_event:
ERROR: Could not read entry at offset 4294967295: Error in log format or read error.
tags: | added: upstream |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PS-916