View Issue Details

IDProjectCategoryView StatusLast Update
0004973SymmetricDSBugpublic2022-08-04 20:24
Reporteradisman Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.12.9 
Target Version3.12.10Fixed in Version3.12.10 
Summary0004973: Unicode synchronization of utf8 strings with 4 byte characters in MySql and MariaDB does not work
DescriptionUnicode synchronization of utf8 strings with 4 byte characters in MySql and MariaDB does not work

In MySQL and MariaDB, to work with unicode characters occupying 4 bytes in UTF8, it is recommended to use the utf8mb4 character set instead of utf8, which can only 3 bytes of characters.

To enable 4-byte UTF8 byte support, simply edit the MySqlTriggerTemplate.java trigger template on lines 90 and 91.

So just change the character set for these two variables from utf8 to utf8mb4.
  
So from:
  
DECLARE var_row_data mediumtext character set utf8;
DECLARE var_old_data mediumtext character set utf8;

on

DECLARE var_row_data mediumtext character set utf8mb4;
DECLARE var_old_data mediumtext character set utf8mb4;
                  

For maximum flexibility and the possibility of choosing a variant (utf8 - utf8mb4) by the user, it could be possible to choose a variant based on the settings.
TagsNo tags attached.

Relationships

related to 0004488 closedelong UPDATE triggers have local variables defined with hardcoded "utf8" charset 

Activities

elong

2021-05-06 12:41

developer   ~0001933

We'll use utf8mb4 for MySQL 5.5.3 and newer, but continue to use utf8 for older versions. It can be overridden with db.master.collation parameter.

Related Changesets

SymmetricDS: 3.12 30bb8468

2021-05-05 20:40:32

admin

Details Diff
0004973: use utf8mb4 when available Affected Issues
0004973
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/mysql/MySqlSymmetricDialect.java Diff File
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/mysql/MySqlTriggerTemplate.java Diff File

Issue History

Date Modified Username Field Change
2021-05-02 08:00 adisman New Issue
2021-05-05 21:00 admin Changeset attached => SymmetricDS 3.12 30bb8468
2021-05-06 12:41 elong Note Added: 0001933
2021-05-06 12:42 elong Assigned To => elong
2021-05-06 12:42 elong Status new => resolved
2021-05-06 12:42 elong Resolution open => fixed
2021-05-06 12:42 elong Fixed in Version => 3.12.10
2021-05-06 12:42 elong Target Version => 3.12.10
2021-05-28 20:40 admin Status resolved => closed
2022-08-04 20:24 elong Relationship added related to 0004488