START TRANSACTION;
update my_pay_table set pay_fee = 66 where order_id ='100000014157340598267809792';
update my_pay_table set pay_fee = 989 where order_id ='100000014157340598267809792';
commit;
对于同个事务中两个update,我看binlog中的commitTs值是一样的,那么是不是只能根据mutations的顺序来区分两条记录变更的顺序了?因为发现同个订单的两条数据其update_sys_tm时间可能是一样的,无法区分出更新的先后顺序
binlog内容:
type: DML
commit_ts: 448392993097646086
dml_data {
tables {
schema_name: "my_schema_name"
table_name: "my_pay_table"
column_info {
name: "id"
mysql_type: "bigint"
is_primary_key: true
}
column_info {
name: "user_id"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "user_type"
mysql_type: "tinyint"
is_primary_key: false
}
column_info {
name: "user_contact"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "pay_msg_id"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "pay_order_id"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "biz_order_id"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "model_type_code"
mysql_type: "tinyint"
is_primary_key: false
}
column_info {
name: "order_id"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "pay_fee"
mysql_type: "bigint"
is_primary_key: false
}
column_info {
name: "real_refund_fee"
mysql_type: "bigint"
is_primary_key: false
}
column_info {
name: "pay_status"
mysql_type: "tinyint"
is_primary_key: false
}
column_info {
name: "pay_time"
mysql_type: "datetime"
is_primary_key: false
}
column_info {
name: "pay_channel"
mysql_type: "tinyint"
is_primary_key: false
}
column_info {
name: "pay_way"
mysql_type: "tinyint"
is_primary_key: false
}
column_info {
name: "third_reduce_fee"
mysql_type: "bigint"
is_primary_key: false
}
column_info {
name: "third_trade_no"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "refund_fee"
mysql_type: "bigint"
is_primary_key: false
}
column_info {
name: "callback_topic"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "callback_class"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "remark"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "ext1"
mysql_type: "varchar"
is_primary_key: false
}
column_info {
name: "delete_flag"
mysql_type: "tinyint"
is_primary_key: false
}
column_info {
name: "create_sys_tm"
mysql_type: "datetime"
is_primary_key: false
}
column_info {
name: "update_sys_tm"
mysql_type: "datetime"
is_primary_key: false
}
column_info {
name: "visit_source"
mysql_type: "tinyint"
is_primary_key: false
}
mutations {
type: Update
row {
columns {
int64_value: 157340602831212544
}
columns {
string_value: "5546"
}
columns {
int64_value: 1
}
columns {
string_value: "110"
}
columns {
string_value: "pay_code160827762502068"
}
columns {
string_value: "100000014157340598267809792"
}
columns {
string_value: "10160827762449146"
}
columns {
int64_value: 14
}
columns {
string_value: "100000014157340598267809792"
}
columns {
uint64_value: 66
}
columns {
uint64_value: 0
}
columns {
int64_value: 2
}
columns {
string_value: "2020-12-18 15:47:05"
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
string_value: "third_trade_no160827762502018"
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
int64_value: 0
}
columns {
string_value: "2020-12-18 15:52:50"
}
columns {
string_value: "2024-03-15 14:18:44"
}
columns {
int64_value: 0
}
}
change_row {
columns {
int64_value: 157340602831212544
}
columns {
string_value: "5546"
}
columns {
int64_value: 1
}
columns {
string_value: "110"
}
columns {
string_value: "pay_code160827762502068"
}
columns {
string_value: "100000014157340598267809792"
}
columns {
string_value: "10160827762449146"
}
columns {
int64_value: 14
}
columns {
string_value: "100000014157340598267809792"
}
columns {
uint64_value: 111
}
columns {
uint64_value: 0
}
columns {
int64_value: 2
}
columns {
string_value: "2020-12-18 15:47:05"
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
string_value: "third_trade_no160827762502018"
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
int64_value: 0
}
columns {
string_value: "2020-12-18 15:52:50"
}
columns {
string_value: "2020-12-18 15:52:50"
}
columns {
int64_value: 0
}
}
}
mutations {
type: Update
row {
columns {
int64_value: 157340602831212544
}
columns {
string_value: "5546"
}
columns {
int64_value: 1
}
columns {
string_value: "110"
}
columns {
string_value: "pay_code160827762502068"
}
columns {
string_value: "100000014157340598267809792"
}
columns {
string_value: "10160827762449146"
}
columns {
int64_value: 14
}
columns {
string_value: "100000014157340598267809792"
}
columns {
uint64_value: 989
}
columns {
uint64_value: 0
}
columns {
int64_value: 2
}
columns {
string_value: "2020-12-18 15:47:05"
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
string_value: "third_trade_no160827762502018"
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
int64_value: 0
}
columns {
string_value: "2020-12-18 15:52:50"
}
columns {
string_value: "2024-03-15 14:18:44"
}
columns {
int64_value: 0
}
}
change_row {
columns {
int64_value: 157340602831212544
}
columns {
string_value: "5546"
}
columns {
int64_value: 1
}
columns {
string_value: "110"
}
columns {
string_value: "pay_code160827762502068"
}
columns {
string_value: "100000014157340598267809792"
}
columns {
string_value: "10160827762449146"
}
columns {
int64_value: 14
}
columns {
string_value: "100000014157340598267809792"
}
columns {
uint64_value: 66
}
columns {
uint64_value: 0
}
columns {
int64_value: 2
}
columns {
string_value: "2020-12-18 15:47:05"
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
string_value: "third_trade_no160827762502018"
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
is_null: true
}
columns {
int64_value: 0
}
columns {
string_value: "2020-12-18 15:52:50"
}
columns {
string_value: "2024-03-15 14:18:44"
}
columns {
int64_value: 0
}
}
}
5: {
1: "PRIMARY"
2: "id"
}
}
}