Skip to content

encoding failed when processing queries with GBK/GB18030 #17618

@CbcWestwolf

Description

@CbcWestwolf

Bug Report

What version of TiKV are you using?

master

What operating system and CPU are you using?

not system related bug

Steps to reproduce

  1. start a cluster with pd, tidb and tikv
  2. execute the following queries
CREATE TABLE t1 (c VARCHAR(4) CHARACTER SET gbk);
INSERT INTO t1 VALUES (0x8BF5819AEDC3); --'嬽仛砻', or others like (0x90459958) '怑橷'
SELECT ANY_VALUE(HEX(c)), COUNT(c) FROM t1 GROUP BY c COLLATE gbk_chinese_ci;
-- or SELECT ANY_VALUE(HEX(c)), COUNT(c) FROM t1 GROUP BY c COLLATE gbk_bin;

What did you expect?

All statements succeed to execute (mysql-server and tidb with unistore can execute)

What did happened?

Encounter (1105, 'encoding failed') for last statement

Metadata

Metadata

Assignees

Labels

affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.component/GBKseverity/majortype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions