[iyunv@centos6 binlog]# mysqlbinlog --start-position=245 master-bin.000005
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#161117 6:43:00 server id 1 end_log_pos 245 Start: binlog v 4, server v5.5.32-MariaDB-log created 161117 6:43:00
# Warning: this binlog is either in use or was not closed properly.
BINLOG '
9OAsWA8BAAAA8QAAAPUAAAABAAQANS41LjMyLU1hcmlhREItbG9nAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAA2QAEGggAAAAICAgCAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAALfrHBw==
'/*!*/;
# at 245
#161117 7:01:18 server id 1 end_log_pos 352 Querythread_id=23exec_time=0error_code=0
use `hellodb`/*!*/;
SET TIMESTAMP=1479337278/*!*/;
SET @@session.pseudo_thread_id=23/*!*/;
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/*!*/;
DROP TABLE `t1` /* generated by server */
/*!*/;
# at 352
#161117 7:01:51 server id 1 end_log_pos 459 Querythread_id=23exec_time=0error_code=0
SET TIMESTAMP=1479337311/*!*/;
create table tb1(id int,name varchar(20))
/*!*/;
# at 459
#161117 7:02:43 server id 1 end_log_pos 530 Querythread_id=23exec_time=0error_code=0
SET TIMESTAMP=1479337363/*!*/;
BEGIN
/*!*/;
# at 530
#161117 7:02:43 server id 1 end_log_pos 642 Querythread_id=23exec_time=0error_code=0
SET TIMESTAMP=1479337363/*!*/;
insert into tb1 values(1,'alren'),(2,'tbname')
/*!*/;
# at 642
#161117 7:02:43 server id 1 end_log_pos 669 Xid = 1515
COMMIT/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
[iyunv@centos6 binlog]# mysqlbinlog --start-position=245 master-bin.000005 >inre.sql