Wrong error message returned by tikv when using incorrect datetime value
- 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 t(col_varchar_nokey VARCHAR(1) NOT NULL,
col_time_nokey time NOT NULL,
col_int_nokey INT NOT NULL,
col_datetime_key datetime not null,
key(col_datetime_key)) ENGINE= InnoDB;
INSERT INTO t VALUES('x', CURRENT_TIME(), 0, CURRENT_TIMESTAMP());
UPDATE t SET `col_datetime_key` = `col_datetime_key` WHERE
`col_datetime_key` <=> FROM_UNIXTIME(1151860736,CONCAT_WS(':','%D','%v'));
```
### 2. What did you expect to see? (Required)
`ERROR 1292 (22007): Incorrect datetime value: '3rd:27'`
### 3. What did you see instead (Required)
Different storages return different error messages
When storage is "tikv", the result is as follows:
```
Query OK, 0 rows affected, 1 warning (0.01 sec)
Rows matched: 0 Changed: 0 Warnings: 1
tidb> show warnings;
+---------+------+-------------------------------------------------------+
| Level | Code | Message |
+---------+------+-------------------------------------------------------+
| Warning | 1292 | evaluation failed: Incorrect datetime value: '3rd:27' |
+---------+------+-------------------------------------------------------+
1 row in set (0.00 sec)
```
### 4. What is your TiDB version? (Required)
```
| Release Version: v6.2.0-alpha-122-ga5d6db20d
Edition: Community
Git Commit Hash: a5d6db20d7982cff4a8fc963c198c0fad864a05e
Git Branch: master
```
Contributor guide
Assessment
This issue has not been assessed yet.