Skip to content

bug: (Primary/Secondary)After the character set is converted.Data on the primary database and that on the secondary database are inconsistent. #1199

@haitaoguan

Description

@haitaoguan

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

create table ttt(id int,name varchar(5));
insert into ttt values(1,'AAA'),(2,'BBB');
alter table ttt convert to character set utf8;
delete from ttt where id=1;
alter table ttt convert to character set utf8mb4;

###MASTER
mysql> show create table ttt\G
*************************** 1. row ***************************
       Table: ttt
Create Table: CREATE TABLE `ttt` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(5) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
1 row in set (0.00 sec)

mysql> select * from ttt;
+------+------+
| id   | name |
+------+------+
|    2 | BBB  |
+------+------+
1 row in set (0.00 sec)

###SLAVE
mysql> show create table ttt\G
*************************** 1. row ***************************
       Table: ttt
Create Table: CREATE TABLE `ttt` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(5) DEFAULT NULL
) ENGINE=TIANMU DEFAULT CHARSET=utf8mb4
1 row in set (0.01 sec)

mysql> select * from ttt;
+------+------+
| id   | name |
+------+------+
| NULL | NULL |
|    2 | BBB  |
+------+------+
2 rows in set (0.00 sec)

Expected behavior

mysql> select * from ttt;
+------+------+
| id   | name |
+------+------+
|    2 | BBB  |
+------+------+
1 row in set (0.00 sec)

How To Reproduce

No response

Environment

./mysqld Ver 5.7.36-StoneDB for Linux on x86_64 (build-)
build information as follow:
Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
Branch name: stonedb-5.7-dev
Last commit ID: 0bc2cbe
Last commit time: Date: Fri Dec 30 17:46:55 2022 +0800
Build time: Date: Tue Jan 3 09:59:43 CST 2023

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!

Metadata

Metadata

Assignees

Labels

A-bugSomething isn't workingB-DDLDDL related issuesB-master-replicamaster/replica sync, replayB-storagedata type, data storage, insert,update,delete, transactionsprio: highHigh priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions