-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Milestone
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
- I have checked the FAQ of this repository and believe that this is not a duplicate.
environment
- canal version
v1.1.17 - mysql version
8.0.29
Issue Description
当源库的json字符插入类似如下这种key包含特殊字符的数据时:
{"key1": {"(.)(/[^/]+\.(mp|MP)4)$": "value1"}}
这个值的key包括\转义符,解析出来的值会变成:
{"key1": {"(.)(/[^/]+.(mp|MP)4)$": "value1"}}
这少了一个转义符\,导致插入目标库报错
nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Invalid JSON text: "Invalid escape character in string." at position XX in value for column
Steps to reproduce
Expected behaviour
{"key1": {"(.*)(/[^/]+\.(mp|MP)4)$": "value1"}}
Actual behaviour
{"key1": {"(.*)(/[^/]+.(mp|MP)4)$": "value1"}}
If there is an exception, please attach the exception trace:
Just put your stack trace here!