-
Notifications
You must be signed in to change notification settings - Fork 134
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
non-ASCII / Chinese table name #733
Comments
ghost
added this to the next milestone
Jul 9, 2021
ghost
mentioned this issue
Feb 23, 2022
golang中
s := "a中文"
for i, v := range s {
stringVar[i] // byte
v // rune
} |
2 增量过程中以非utf8执行DDL, 含non-ASCII表名
问题: job.hcl使用UTF8. dtle不认为乱码库表名属于复制范围. |
构造一个混合encoding的DDL并执行 echo 'set names gbk;' > create.sql
echo 'create table s中文.tdef (id中文 int primary key auto_increment,' | iconv -t gbk >> create.sql
echo ' val varchar(50) default _utf8mb4"aa中文");' >> create.sql
mysql -h ... < create.sql binlog QueryEvent中以原始语句记录. |
以gbk DDL为例: 方案1: 全面转换为UTF8, 以UTF8执行
方案2: 将库表列名转换为UTF8进行复制范围比较. 保留原文, 以gbk执行.
|
综合考虑, 决定使用方案1, 并作如下限制:
|
ghost
pushed a commit
that referenced
this issue
Mar 24, 2022
limitation: do not use hybrid encoded ddl. e.g create table gbk_name (val varchar(50) default _sjis"sjis_value");
ghost
closed this as completed
Mar 28, 2022
增加测试用例覆盖范围,在已有的ddl测试用例上增加中文字符用例,包含一下范围:
|
ghost
pushed a commit
that referenced
this issue
Aug 1, 2022
and take all unrecognized character set as binary.
ghost
pushed a commit
that referenced
this issue
Aug 2, 2022
and take all unrecognized character set as binary.
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: