View Issue Details

IDProjectCategoryView StatusLast Update
0004488SymmetricDSBugpublic2020-07-29 11:01
Reportertomas.marikAssigned To 
Priorityhigh 
Status newResolutionopen 
Product Version3.12.2 
Target VersionFixed in Version 
Summary0004488: UPDATE triggers have local variables defined with hardcoded "utf8" charset
DescriptionHi,

There is hardcoded "utf8" charset in MySql Trigger Template in definition of local variables "var_row_data" and "var_old_data" here:
https://github.com/JumpMind/symmetric-ds/blob/3.12/symmetric-client/src/main/java/org/jumpmind/symmetric/db/mysql/MySqlTriggerTemplate.java#L90

Other "SYM_" triggers (AFTER INSERT, AFTER DELETE) are not affected.

This causes error when the database and its tables support "utf8mb4" charset and you try to update row with some unicode character (ie. adding an emoji to some varchar cell of a row). MySQL fails with error:

"Incorrect string value: '\xF0\x9F\x98\x81V\xC3...' for column 'var_row_data' at row 1"

preventing the row to be updated.

Please remove hardcoded charset definition or add a possibility to set desired charset in some configuration.

Thanks.
Tagscharset, dialect: mysql/mariadb, trigger, utf8, utf8mb4

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-07-29 11:01 tomas.marik New Issue
2020-07-29 11:01 tomas.marik Tag Attached: dialect: mysql/mariadb
2020-07-29 11:01 tomas.marik Tag Attached: trigger
2020-07-29 11:01 tomas.marik Tag Attached: charset
2020-07-29 11:01 tomas.marik Tag Attached: utf8
2020-07-29 11:01 tomas.marik Tag Attached: utf8mb4