Skip to content

MySQL Emoji character replicate "?" for PostgreSQL #157

@giant-ksj

Description

@giant-ksj

Describe the bug
A clear and concise description of what the bug is.

  1. Source Data (MySQL v8)
    mysql> select * from test;
    +----+------+
    | id | nm |
    +----+------+
    | 2 | abc |
    | 3 | def |
    | 4 | def |
    | 5 | 😥 |
    +----+------+

  2. init_replica & start_replica

  3. Target Data (PostgreSQL v13)
    postgres> select * from test;
    id | nm
    ----+-----
    2 | abc
    3 | def
    4 | def
    5 | ? <- Emoji character print "?"

  4. Inset new Emoji on MySQL
    mysql> insert into test values(6, '😥');
    mysql> select * from test;;
    +----+------+
    | id | nm |
    +----+------+
    | 2 | abc |
    | 3 | def |
    | 4 | def |
    | 5 | 😥 |
    | 6 | 😥 |
    +----+------+

  5. PostgreSQL print correct Emoji.
    postgres> select * from test;
    id | nm
    ----+-----
    2 | abc
    3 | def
    4 | def
    5 | ?
    6 | 😥

I tried file and direct options when execute init_replica. but both option has same problem.
After updated id=5 row on MySQL, then PostgreSQL print Emoji correctly.

mysql> alter table test add col varchar(10);
mysql> update test set col = 'help' where id = 5;
mysql> select * from test;
+----+------+------+
| id | nm | col |
+----+------+------+
| 2 | abc | NULL |
| 3 | def | NULL |
| 4 | def | NULL |
| 5 | 😥 | help |
| 6 | 😥 | NULL |
+----+------+------+

postgres> select * from test;
id | nm | col
----+-----+--------
2 | abc | (null)
3 | def | (null)
4 | def | (null)
6 | 😥 | (null)
5 | 😥 | help

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
image

image

Environment(please complete the following information):

  • OS: [CentOS7]
  • MySQL Version[8.0.19]
  • PostgreSQL Version[13]
  • Python Version [3.6]
  • Cloud hosted database [self managed vm]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions