unexpect ERROR 1292 (22007): Truncated incorrect decimal
- 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)
```
create table t0 (c0 decimal(10,0) NOT NULL);
insert into t0 values (1);
UPDATE t0 set c0=(BINARY (c0 IS NULL));
```
### 2. What did you expect to see? (Required)
update ok
### 3. What did you see instead (Required)
```
ERROR 1292 (22007): Truncated incorrect decimal(10,0) value: '0
```
### 4. What is your TiDB version? (Required)
```
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.3.0
Edition: Community
Git Commit Hash: 1a0c3ac3292fff7742faa0c00a662ccb66ba40db
Git Branch: HEAD
UTC Build Time: 2024-08-20 10:23:00
GoVersion: go1.21.10
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```
Contributor guide
Assessment
This issue has not been assessed yet.