pingcap / pingcap/tidb

Unexpected error: "[HY000][1105] Data Too Long, field len 1, data len 3"

Open
#63,775 0 comments 0 reactions 0 assignees View on GitHub
contribution sig/execution type/bug
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 tb0;
CREATE TABLE tb0(c0 BLOB(452) , c1 DECIMAL , c2 CHAR PRIMARY KEY);
INSERT INTO tb0(c2) VALUES ('c'), ('꾡');

UPDATE tb0 SET c1=NULL, c2=NULL, c0=111 WHERE (((-1786670785)NOT LIKE((NULL) BETWEEN (tb0.c2) AND (tb0.c0)))) BETWEEN (tb0.c0) AND (3644850330);
```

### 2. What did you expect to see? (Required)
MySQL result:
```
mysql> UPDATE tb0 SET c1=NULL, c2=NULL, c0=111 WHERE (((-1786670785)NOT LIKE((NULL) BETWEEN (tb0.c2) AND (tb0.c0)))) BETWEEN (tb0.c0) AND (3644850330);
Query OK, 0 rows affected (0.001 sec)
Rows matched: 0 Changed: 0 Warnings: 0

mysql> select version();
+-----------+
| version() |
+-----------+
| 8.4.6 |
+-----------+
1 row in set (0.000 sec)
```
### 3. What did you see instead (Required)
```
mysql> UPDATE tb0 SET c1=NULL, c2=NULL, c0=111 WHERE (((-1786670785)NOT LIKE((NULL) BETWEEN (tb0.c2) AND (tb0.c0)))) BETWEEN (tb0.c0) AND (3644850330);
ERROR 1105 (HY000): Data Too Long, field len 1, data len 3
```
### 4. What is your TiDB version? (Required)
```
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v9.0.0-beta.2.pre-250-ga6d415f24a
Edition: Community
Git Commit Hash: a6d415f24a7d182ebca3d189c457d9044537028f
Git Branch: HEAD
UTC Build Time: 2025-08-03 10:01:12
GoVersion: go1.23.11
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Kernel Type: Classic |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.