PREPARE INSERT with COMPRESS(?) returns ERROR 1406 when prepared plan cache is enabled
- 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)
```
SET tidb_enable_prepared_plan_cache=1;
CREATE TABLE t (
id INT NOT NULL,
req_body MEDIUMBLOB DEFAULT NULL,
PRIMARY KEY (id)
);
PREPARE stmt FROM
'INSERT INTO t
(id, req_body)
VALUES (?, COMPRESS(?))';
SET @p1 = 1;
SET @p2 = '{"k":"v","payload":"MASKED_TEXT_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"}';
EXECUTE stmt USING @p1, @p2;
```
### 2. What did you expect to see? (Required)
No error.
### 3. What did you see instead (Required)
ERROR 1406 (22001): Data too long for column 'req_body' at row 1
### 4. What is your TiDB version? (Required)
v7.5.6
Contributor guide
Assessment
This issue has not been assessed yet.