Failed to check NULL parameters in TRUNCATE operation
- 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)
```sql
DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY);
INSERT INTO t1 VALUES (0);
SELECT TRUNCATE(c1 = -1, -1.0 << NULL) FROM t1; -- acutal: {0}, expected: {NULL}
```
### 2. What did you expect to see? (Required)
NULL should be returned.
### 3. What did you see instead (Required)
0 was returned.
### 4. What is your TiDB version? (Required)
Release Version: v8.5.3
Edition: Community
Git Commit Hash: dc2548aac79a712265e831cff2a3a896bc0a5a38
Git Branch: HEAD
UTC Build Time: 2025-07-31 13:54:43
GoVersion: go1.23.8
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Contributor guide
Assessment
This issue has not been assessed yet.