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

ERROR 1115 (42000): Unknown character set: 'UTF8MB4' #8042

Closed
jianhaiqing opened this issue Oct 24, 2018 · 7 comments
Closed

ERROR 1115 (42000): Unknown character set: 'UTF8MB4' #8042

jianhaiqing opened this issue Oct 24, 2018 · 7 comments
Assignees
Labels
type/question The issue belongs to a question.

Comments

@jianhaiqing
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    migrate data from MySQL to tidb;

  2. What did you expect to see?
    loader .sql files dumped by mydump into tidb successfully.

  3. What did you see instead?

ERROR 1115 (42000): Unknown character set: 'UTF8MB4';

INSERT INTO message_reply VALUES
(19,"aaf1bd3cef044ebb9b33212d3639a9ca",CONVERT("[{"answer": {"content": "感谢您购买课程,课程所提到的表格可在此处下载:如有问题请回复“人工客服”,加客服微信
。"}, "answerType": 1}]" USING UTF8MB4),"2018-06-04 12:50:55","2018-06-04 12:54:32",0,2,"时间管理");

CREATE TABLE message_reply (
id int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
reply_id char(32) NOT NULL,
answer json DEFAULT NULL COMMENT '回复的内容-格式为list,有两个字段:"answerType"://''发送客服消息类型:1-文本消息,2-图片消息,3-小程序卡片, 4-图文链接''; answer:回复内容',
create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
is_deleted tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已删除',
type tinyint(4) NOT NULL DEFAULT '0' COMMENT '微信平台类型:1:小程序,2:补给站公众号',
question_key varchar(64) NOT NULL DEFAULT '' COMMENT '问题的关键字',
PRIMARY KEY (id),
UNIQUE KEY uk_reply_id (reply_id),
UNIQUE KEY uk_reply_question_type (question_key,type)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
    Release Version: v2.0.7
    Git Commit Hash: 29ec059
    Git Branch: release-2.0
    UTC Build Time: 2018-09-07 12:36:02
    GoVersion: go version go1.11 linux/amd64
    TiKV Min Version: 2.0.0-rc.4.1

tidb_server output:
show variables like '%lower%';
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| lower_case_table_names | 2 |
| lower_case_file_system | ON |
+------------------------+-------+

@XuHuaiyu XuHuaiyu added the type/question The issue belongs to a question. label Oct 24, 2018
@winkyao winkyao self-assigned this Oct 24, 2018
@winkyao
Copy link
Contributor

winkyao commented Oct 24, 2018

Thanks for your feedback @jianhaiqing I'll look into this issue.

@jianhaiqing
Copy link
Author

jianhaiqing commented Oct 25, 2018

i was blocked, any ideas Or workaround?

@XuHuaiyu
Copy link
Contributor

Hi, @jianhaiqing we're working on this.
We'll reply to you soon.

PTAL @zimulala

@winkyao
Copy link
Contributor

winkyao commented Oct 25, 2018

@jianhaiqing can you use utf8 instead of utf8mb4? I will fix this issue in next release 2.0 version.

like :

mysql> INSERT INTO message_reply VALUES (19,"aaf1bd3cef044ebb9b33212d3639a9ca",CONVERT('[{"answer": {"content": "感谢您购买课程,课程所提到的表格可在此处下载:如有问题请回复“人工客服”,加客服微信 。"}, "answerType": 1}]' USING UTF8MB4),"2018-06-04 12:50:55","2018-06-04 12:54:32",0,2,"时间管理");
ERROR 1115 (42000): Unknown character set: 'UTF8MB4'
mysql> INSERT INTO message_reply VALUES (19,"aaf1bd3cef044ebb9b33212d3639a9ca",CONVERT('[{"answer": {"content": "感谢您购买课程,课程所提到的表格可在此处下载:如有问题请回复“人工客服”,加客服微信 。"}, "answerType": 1}]' USING UTF8),"2018-06-04 12:50:55","2018-06-04 12:54:32",0,2,"时间管理");
Query OK, 1 row affected (0.00 sec)

@winkyao
Copy link
Contributor

winkyao commented Oct 25, 2018

This issue is fixed in #7339, in master branch and release 2.1 included this commit, and unfortunately release 2.0 is not, I will cherry-pick this PR to release 2.0 soon.

You can:

  1. Upgrade your TiDB to v2.1.0-rc.4(but it will import the other new features.)
  2. Wait for the next 2.0 release, (it will be v2.0.9).
  3. Use utf8 instead.

@jianhaiqing
Copy link
Author

OK, it works. Thank you so much.
Out of curiosity, how to identify the issue is a bug or question ?

@XuHuaiyu
Copy link
Contributor

Glad to hear that.

In normal circumstances, most of the issues are question, we'll check whether it's a bug or a compatibility problem during the process of a specified issue.

Feel free to file new issues here if you got any problems in future.

@winkyao winkyao closed this as completed Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question The issue belongs to a question.
Projects
None yet
Development

No branches or pull requests

3 participants