tidb
tidb copied to clipboard
Error message: Unexpected line break
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
CREATE TABLE `PK_MULTI_COL_4820` (
`COL1` binary(10) NOT NULL,
`COL2` char(1) NOT NULL,
`COL3` mediumint(45) NOT NULL,
PRIMARY KEY (`COL1`(5),`COL2`,`COL3`) /*T![clustered_index] CLUSTERED */,
UNIQUE KEY `UIDXM` (`COL1`(5),`COL2`),
UNIQUE KEY `UIDX` (`COL2`),
KEY `IDX3` (`COL3`),
KEY `IDXM` (`COL3`,`COL2`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
select max(col1), min(col1), count(col1), max(col2), min(col2), count(col2), count(1), count(*) from PK_MULTI_COL_4820 where col2 in (0xFF1C320A347AACB924E9, 0xFF1C320A347AACB924E9, 0xFF1C320A347AACB924E9) group by col1, col2;
2. What did you expect to see? (Required)
Error messages are displayed on one line
This is mysql return:
ERROR 3854 (HY000): Cannot convert string '\xFF\x1C2\x0A4z...' from binary to utf8mb4
3. What did you see instead (Required)
It looks like TiDB interprets a character as a line break
mysql> select max(col1), min(col1), count(col1), max(col2), min(col2), count(col2), count(1), count(*) from PK_MULTI_COL_4820 where col2 in (0xFF1C320A347AACB924E9, 0xFF1C320A347AACB924E9, 0xFF1C320A347AACB924E9) group by col1, col2;
ERROR 3854 (HY000): Cannot convert string '\xFF2
4z...' from binary to utf8mb4
4. What is your TiDB version? (Required)
Release Version: v8.4.0 Edition: Community Git Commit Hash: 1832b2728d7ae494684bdeb32b4af0a5a927bf89 Git Branch: HEAD UTC Build Time: 2024-10-15 03:47:37 GoVersion: go1.23.2 Race Enabled: false Check Table Before Drop: false Store: tikv
/severity minor /component parser
/label fuzz/comp