1root@mysql8020M1:/var/lib/mysql# mysqlbinlog mysql8020M1-bin.000008 --base64-output=decode-row -vv | grep UPDATE | wc -l
240000
3root@mysql8020M1:/var/lib/mysql# mysqlbinlog mysql8020M1-bin.000008 --base64-output=decode-row -vv | more
4/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
5/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
6DELIMITER /*!*/;
7# at 4
8#201112 11:25:24 server id 80203318 end_log_pos 125 CRC32 0x11d2d479 Start: binlog v 4, server v 8.0.20 created 201112 11:25:24
9# Warning: this binlog is either in use or was not closed properly.
10# at 125
11#201112 11:25:24 server id 80203318 end_log_pos 196 CRC32 0x443aeae4 Previous-GTIDs
12# dcccf122-1e40-11eb-8ca0-0242c0a844a8:1-240042
13# at 196
14#201112 11:25:33 server id 80203318 end_log_pos 276 CRC32 0xa8eb8112 GTID last_committed=0 sequence_number=1 rbr_only=yes original_committed_timestamp=1605151535412817 immediate_commit_timestamp=1605151535412817 transaction_length=2451018
15/*!50718 SET TRANSACTION ISOLATION LEVEL READ COMMITTED*//*!*/;
16# original_commit_timestamp=1605151535412817 (2020-11-12 11:25:35.412817 CST)
17# immediate_commit_timestamp=1605151535412817 (2020-11-12 11:25:35.412817 CST)
18/*!80001 SET @@session.original_commit_timestamp=1605151535412817*//*!*/;
19/*!80014 SET @@session.original_server_version=80020*//*!*/;
20/*!80014 SET @@session.immediate_server_version=80020*//*!*/;
21SET @@SESSION.GTID_NEXT= 'dcccf122-1e40-11eb-8ca0-0242c0a844a8:240043'/*!*/;
22# at 276
23#201112 11:25:33 server id 80203318 end_log_pos 362 CRC32 0x0b667ff4 Query thread_id=26 exec_time=0 error_code=0
24SET TIMESTAMP=1605151533/*!*/;
25SET @@session.pseudo_thread_id=26/*!*/;
26SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
27SET @@session.sql_mode=1168113696/*!*/;
28SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
29
30-- 省略部分 ..................
31#201112 11:25:33 server id 80203318 end_log_pos 2446999 CRC32 0x6e0e09e8 Update_rows: table id 105
32# at 2446999
33#201112 11:25:33 server id 80203318 end_log_pos 2451183 CRC32 0x30bfc23e Update_rows: table id 105 flags: STMT_END_F
34### UPDATE `lhrdb1`.`t`
35### WHERE
36### @1=20001 /* INT meta=0 nullable=0 is_null=0 */
37### @2='主键测试20001' /* VARSTRING(80) meta=80 nullable=0 is_null=0 */
38### SET
39### @1=20001 /* INT meta=0 nullable=0 is_null=0 */
40### @2='主键测试,结果验证20001' /* VARSTRING(80) meta=80 nullable=0 is_null=0 */
41### UPDATE `lhrdb1`.`t`
42### WHERE
43### @1=20002 /* INT meta=0 nullable=0 is_null=0 */
44### @2='主键测试20002' /* VARSTRING(80) meta=80 nullable=0 is_null=0 */
45### SET
46### @1=20002 /* INT meta=0 nullable=0 is_null=0 */
47### @2='主键测试,结果验证20002' /* VARSTRING(80) meta=80 nullable=0 is_null=0 */
48
49-- 省略部分 ..................
50
51root@mysql8020M1:/var/lib/mysql# mysqlbinlog mysql8020M1-bin.000008 --base64-output=decode-row -vv | tail -n 20
52### @1=59999 /* INT meta=0 nullable=0 is_null=0 */
53### @2='主键测试59999' /* VARSTRING(80) meta=80 nullable=0 is_null=0 */
54### SET
55### @1=59999 /* INT meta=0 nullable=0 is_null=0 */
56### @2='主键测试,结果验证59999' /* VARSTRING(80) meta=80 nullable=0 is_null=0 */
57### UPDATE `lhrdb1`.`t`
58### WHERE
59### @1=60000 /* INT meta=0 nullable=0 is_null=0 */
60### @2='主键测试60000' /* VARSTRING(80) meta=80 nullable=0 is_null=0 */
61### SET
62### @1=60000 /* INT meta=0 nullable=0 is_null=0 */
63### @2='主键测试,结果验证60000' /* VARSTRING(80) meta=80 nullable=0 is_null=0 */
64# at 2451183
65#201112 11:25:33 server id 80203318 end_log_pos 2451214 CRC32 0x3d5db696 Xid = 720239
66COMMIT/*!*/;
67SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/;
68DELIMITER ;
69# End of log file
70/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
71/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;