-
Notifications
You must be signed in to change notification settings - Fork 688
Description
Version
Please specify the versions you are using. Exact version numbers are preferred.
- Pymyrepl (0.45.1):
- Pymysql (1.1.0)
- OS (Centos 7):
- Database and version (Remove unnecessary options):
- MySQL: 8.0.32
System Variables
List relevant system variables using the query SHOW VARIABLES LIKE '<variable_name_here>';
log_bin
: YESbinlog_format
: ROWbinlog_row_image
: FULLenforce_gtid_consistency
: Truegtid_mode
: YES
If you are using MySQL 8.0.14 or later, please also provide the following variables:
binlog_row_metadata
: FULLbinlog_row_value_options
: Null
Symptoms
Insert a record into the test01 table. Parse this insertion statement using python-mysql-replication. Then, add a new field age after the is_del field in the test01 table. Once again, parse the initial insertion statement using python-mysql-replication. You will observe that the two parsed statements are different.
Steps to Reproduce
table structure:
CREATE TABLE test01
(
ID
bigint unsigned NOT NULL AUTO_INCREMENT,
is_del
longtext NOT NULL,
name
char(10) DEFAULT NULL,
message
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
PRIMARY KEY (ID
)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb3;
step 1:
##start 276 end 743 time 2024-01-15 04:57:31 gtid 54c86606-1b13-11ee-acab-005056960eee:16
{'values': {'UIDPK': 22, 'is_del': '0', 'name': None, 'message': 'xxxxxxx'}}
step 2:
alter table test01 add column age int after is_del;
step 3:
##start 276 end 743 time 2024-01-15 04:57:31 gtid 54c86606-1b13-11ee-acab-005056960eee:16
{'values': {'UIDPK': 22, 'is_del': '0', 'age': None, 'name': 'xxxxxxx'}}
I noticed that the parsing results for the same event in steps one and two are inconsistent. This event occurs before adding the age field, and it should not be parsed, leading to a misalignment between field names and values.