Not the answer you need?
Register and ask your own question!

Need help to read GRA_x_abc.log files

RBakkumRBakkum EntrantInactive User Role Novice
Hi,

I am trying to read some GRA logfiles found on my percona galera xtradb cluster. But I am having troubles to read the files that being generated.
I created a mysqlbinlog header file from one of the mysqlbinlogs and created a new file to read with the mysqlbinlog command. But instead of seeing what I expect, it responsed with:

```
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!50003 SET @[email protected]@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#190710 14:59:21 server id 500 end_log_pos 123 CRC32 0xb732e7f4 Start: binlog v 4, server v 5.7.26-29-57-log created 190710 14:59:21 at startup
# Warning: this binlog is either in use or was not closed properly.
ROLLBACK/*!*/;
BINLOG '
KeElXQ/0AQAAdwAAAHsAAAABAAQANS43LjI2LTI5LTU3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAp4SVdEzgNAAgAEgAEBAQEEgAAXwAEGggAAAAICAgCAAAACgoKKioAEjQA
AfTnMrc=
'/*!*/;
# at 123
#190710 11:12:41 server id 4 end_log_pos 79 CRC32 0x4e494745 Query thread_id=2708464 exec_time=0 error_code=0
SET TIMESTAMP=1562749961/*!*/;
SET @@session.pseudo_thread_id=2708464/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1434451968/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb4 *//*!*/;
SET @@session.character_set_client=45,@@session.collation_connection=45,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
B
/*!*/;
ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 67, event_type: 19
ROLLBACK /* added by mysqlbinlog */ /*!*/;
SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/;
DELIMITER ;
# End of log file
/*!50003 SET [email protected]_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
```

Where I expected to see my transaction that failed, I see:

```
ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 67, event_type: 19
```

What am I missing in this?
I followed an "ancient" blog post found: https://www.percona.com/blog/2012/12/19/percona-xtradb-cluster-pxc-what-about-gra_-log-files/

My environment:
OS: Ubuntu 18.04
Percona Version: 5.7.26-31.37-1.bionic

Steps I've done to create the mysqlbinlog file:
- head -c 123 mysql-bin.000001 > GRA_HEADER
- cat GRA_HEADER > GRA_2_2950998.log
- cat /var/lib/mysql/GRA_1_2903960 >> GRA_2_2950998.log
- file GRA_2_2950998.log
GRA_2_2950998.log: MySQL replication log, server id 500 MySQL V5+, server version 5.7.26-29-57-log

Thanks for the help.
Regards,
Rene
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.