$ mysqlbinlog -vvv --base64-output=decode-rows --start-position=4 --stop-position=1500 mgr01.001205 mgr01.001206 mgr01.001207 > /tmp/b1
# 查看文本格式的binlog,发现end_log_pos最大值超过了1500
$ grep end_log_pos /tmp/b1 | tail
...
#221030 19:17:12 server id 3306 end_log_pos 1208 CRC32 0x8e5ca346 Table_map: `sbtest`.`sbtest5` mapped to number 926
#221030 19:17:12 server id 3306 end_log_pos 1624 CRC32 0x0059617f Update_rows:table id 926 flags: STMT_END_F
1.
2.
3.
4.
5.
6.
7.
c.指定stop-position对应的是table_map event,会发出WARN
$ mysqlbinlog -vvv --base64-output=decode-rows --start-position=4 --stop-position=1208 mgr01.001205
WARNING: The range of printed events ends with a row event or a table map event that does not have the STMT_END_F flag set. This might be because the last statement was not fully written to the log,or because you are using a --stop-position or --stop-datetime that refers to an event in the middle of a statement. The event(s) from the partial statement have not been written to output.
#221030 19:17:12 server id 3306 end_log_pos 1141 CRC32 0x5226ecd8 Rows_query
# UPDATE sbtest7 SET c='85585077000-51806678786-29036174562-00737528630-90333366602-59672213053-90973506235-01305133574-41639459483-63273277428'WHERE id=83642
# at 1141
#221030 19:17:12 server id 3306 end_log_pos 1208 CRC32 0x96186542 Table_map: `sbtest`.`sbtest7` mapped to number 928
ROLLBACK /* added by mysqlbinlog *//*!*/;SET @@SESSION.GTID_NEXT='AUTOMATIC'/* added by mysqlbinlog *//*!*/;
DELIMITER ;
# End of log file
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;