Special character 㸟 triggers issue:Incorrect string value:
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
c0 VARCHAR(100)
);
INSERT INTO t1 VALUES ('test');
INSERT INTO t1 VALUES ('㸟'); -- 插入特殊字符,触发字符集相关报错的关键
SELECT
t1.c0
FROM
t1
GROUP BY
t1.c0,
((t1.c0) IS NOT NULL),
t1.c0
ORDER BY
(
(
(
CAST(0.4790668160979653 AS DATE)
) IS NOT NULL
) >= ('㸟')
) ASC,
t1.c0 DESC,
(
CASE t1.c0
WHEN t1.c0 THEN ((INET6_ATON(CHAR(t1.c0))) NOT REGEXP (DATE_FORMAT((CASE '-' WHEN t1.c0 THEN ' SELECT t1.c0 FROM t1 GROUP BY t1.c0, ((t1.c0) IS NOT NULL), t1.c0 ORDER BY ( ( ( CAST(0.4790668160979653 AS DATE) ) IS NOT NULL ) >= ('㸟') ) ASC, t1.c0 DESC, ( CASE t1.c0 WHEN t1.c0 THEN ((INET6_ATON(CHAR(t1.c0))) NOT REGEXP (DATE_FORMAT((CASE '-' WHEN t1.c0 THEN ' select version();
+-----------------+
| version() |
+-----------------+
| 11.4.10-MariaDB |
+-----------------+
1 row in set (0.00 sec)
```
### 3. What did you see instead (Required)
```
mysql> SELECT
-> t1.c0
-> FROM
-> t1
-> GROUP BY
-> t1.c0,
-> ((t1.c0) IS NOT NULL),
-> t1.c0
-> ORDER BY
-> (
-> (
-> (
-> CAST(0.4790668160979653 AS DATE)
-> ) IS NOT NULL
-> ) >= ('㸟')
-> ) ASC,
-> t1.c0 DESC,
-> (
-> CASE t1.c0
-> WHEN t1.c0 THEN ((INET6_ATON(CHAR(t1.c0))) NOT REGEXP (DATE_FORMAT((CASE '-' WHEN t1.c0 THEN ' WHEN CAST(((0.2893664052377751)!=('0')) AS DATE) THEN t1.c0
-> ELSE 'VEC*GgW'
-> END
-> );
ERROR 1411 (HY000): Incorrect string value: '
```
### 4. What is your TiDB version? (Required)
```
-------------------------------------------------+
| tidb_version() |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.4.0-this-is-a-placeholder
Edition: Community
Git Commit Hash: None
Git Branch: None
UTC Build Time: None
GoVersion: go1.25.6
Race Enabled: false
Check Table Before Drop: false
Store: unistore
Kernel Type: Classic |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
```
Contributor guide
Assessment
This issue has not been assessed yet.