Bug #64684 Using global transaction ID, log reading gets an error after FLUSH LOGS
Description:
Install a server with binary logs enabled, using the binaries from MySQL labs (global transaction ID).
create a table, then flush logs, then insert one record, and flush logs again.
Reading the first log is OK. Reading the second one generates an error:
ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 1869901417, event_type: 115
ERROR: Could not read entry at offset 284: Error in log format or read error.
Sample output:
~/sandboxes/msb_5_6_4/my sqlbinlog ~/sandboxes/msb_5_6_4/data/mysql-bin.000002
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
SET UGID_NEXT='ANONYMOUS'/*!*/;
#120318 20:55:37 server id 5604 end_log_pos 114 Start: binlog v 4, server v 5.6.4-labs-global-trans-ids-log created 120318 20:55:37
BINLOG '
uT1mTw/kFQAAbgAAAHIAAAAAAAQANS42LjQtbGFicy1nbG9iYWwtdHJhbnMtaWRzLWxvZwAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAGhhotU=
'/*!*/;
# at 114
# Subgroup(#1, 3DE96EE6-7134-11E1-9A60-00265531A0CC:1, END, COMMIT, binlog(no=0, pos=114, len=143, oals=0))
SET UGID_NEXT='3DE96EE6-7134-11E1-9A60-00265531A0CC:1', UGID_END=0, UGID_COMMIT=0/*!*/;
#120318 20:55:47 server id 5604 end_log_pos 189 Query thread_id=3 exec_time=0 error_code=0
SET TIMESTAMP=1332100547/*!*/;
SET @@session.pseudo_thread_id=3/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
# at 189
# Subgroup(#1, 3DE96EE6-7134-11E1-9A60-00265531A0CC:1, END, COMMIT, binlog(no=0, pos=114, len=143, oals=0))
SET UGID_END=1, UGID_COMMIT=1/*!*/;
#120318 20:55:47 server id 5604 end_log_pos 284 Query thread_id=3 exec_time=0 error_code=0
use test/*!*/;
SET TIMESTAMP=1332100547/*!*/;
insert into t1 values (1)
/*!*/;
ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 1869901417, event_type: 115
ERROR: Could not read entry at offset 284: Error in log format or read error.
SET UGID_NEXT='AUTOMATIC'/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
How to repeat:
create table test.t1(i int not null primary key);
flush logs;
insert into test.t1 values (1);
flush logs;
mysqlbinlog $DATADIR/mysql-bin.000001 # this reads fine
mysqlbinlog $DATADIR/mysql-bin.000002 # this one gets an error
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.