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

SQL检测报Unknown charset utf8mb3 #561

Closed
1454513232 opened this issue Mar 20, 2023 · 2 comments
Closed

SQL检测报Unknown charset utf8mb3 #561

1454513232 opened this issue Mar 20, 2023 · 2 comments

Comments

@1454513232
Copy link

1454513232 commented Mar 20, 2023

描述
最新的goInception v1.3.0版本,建表语句会报Unknown charset utf8mb3的错误,且无法跳过

重现
提交建表语句

create table test
(
   id                   char(36) not null COMMENT '主键',
   name               varchar(100) not null COMMENT '姓名',
   isdeleted            numeric(1,0) not null default 0 COMMENT '删除状态',
   db_create_time   datetime(3)  default CURRENT_TIMESTAMP(3) null comment '数据创建时间',
   db_update_time   datetime(3)  default CURRENT_TIMESTAMP(3) null on update CURRENT_TIMESTAMP(3) comment '数据修改时间',
   constraint pk_t_id primary key(id)
) COMMENT='测试表';

SQL检测报错:
Unknown charset utf8mb3.

有的数据库可以通过,有的不能通过,目前发现大部分阿里RDS都会存在问题,之前使用goInception1.2.3版本正常
经排查,阿里的RDS大部分服务端字符集是这样的

character_set_client	utf8mb4
character_set_connection	utf8mb4
character_set_database	utf8mb3
character_set_filesystem	binary
character_set_results	
character_set_server	utf8mb3
character_set_system	utf8mb3
character_sets_dir	/u01/mysql80_20220730/share/charsets/

怀疑和character_set_server默认的utf8mb3有关系,另一个RDS character_set_server为utf8mb4就正常,因为修改这个参数需要重启数据库,所以比较麻烦

环境

  • 数据库: [mysql]
  • 版本: [8.0.25]

参数
goInception的参数设置
support_charset = "utf8,utf8mb4"

@hanchuanchuan
Copy link
Owner

issue重复 #531

@1454513232
Copy link
Author

使用goInception-linux-v1.3.0-68-g2f47aef.tar.gz版本后,该问题已修复,多谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants