Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

char字段包含emoji表情,回滚语句没有生成对应emoji #2405

Closed
4 tasks done
hasa1K opened this issue May 7, 2024 · 0 comments
Closed
4 tasks done

char字段包含emoji表情,回滚语句没有生成对应emoji #2405

hasa1K opened this issue May 7, 2024 · 0 comments
Assignees
Labels
bug Something isn't working publish-pre1
Milestone

Comments

@hasa1K
Copy link
Collaborator

hasa1K commented May 7, 2024

版本信息(Version)

v2 de0923d

问题描述(Describe)

char字段包含emoji表情,生成回滚语句时,以问好代替,没有生成对应的内容

数据库中的数据
image

生成的回滚语句
image

截图或日志(Log)

如何复现(To Reproduce)

  1. 开启在 DML 语句中预计影响行数超过指定值则不回滚 规则
  2. 数据库中插入一段数据包含emoji表情
  3. 然后在工单审核中,审核delete语句

问题原因

查询数据的时候采用的是utf8字符集,没有采用utf8mb4的字符集
image

实现方案

方案一:
在newConn函数中把字符集替换成utf8mb4,但是mysql driver层基本所有操作都要用到这个函数,所以影响面比较大
方案二:
新建一个utf8mb4连接的函数,可以避免修改newConn函数导致影响面过大的问题

选择方案一,原因是:utf8mb4是兼容utf8的,使用utf8mb4对原有功能不会造成太大的影响

变更影响面

受影响的模块或功能

对使用到mysql connection的功能都要测试一下

  • 工单审核/上线/停止上线
  • sql分析
  • 智能扫描
  • 数据源连通性

外部引用的潜在问题或风险

版本兼容性

测试建议

@hasa1K hasa1K added the bug Something isn't working label May 7, 2024
@hasa1K hasa1K changed the title char字段包含emoji表情,生成回滚语句时没有生成对应内容 char字段包含emoji表情,回滚语句没有生成对应emoji May 7, 2024
@ColdWaterLW ColdWaterLW added this to the 3.2405.0 milestone May 8, 2024
@ColdWaterLW ColdWaterLW modified the milestones: v3.2405.0, v3.2406.0 May 27, 2024
@ColdWaterLW ColdWaterLW assigned hasa1K and unassigned ColdWaterLW Jun 5, 2024
@hasa1K hasa1K closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working publish-pre1
Projects
None yet
Development

No branches or pull requests

2 participants