MySQL compatibility: inserting empty string into TIME column behaves differently in TiDB
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
1. Minimal reproduce step
```
CREATE TABLE t(t TIME);
INSERT INTO t VALUES ('');
```
MySQL (8.0.42) for comparison:
```
CREATE TABLE t(t TIME);
SELECT version();
INSERT INTO t VALUES ('');
SELECT * FROM t;
```
2. What did you expect to see?
Behavior consistent with MySQL 8.0:
INSERT INTO t VALUES ('') should succeed
3. What did you see instead
ERROR 1292 (22007): Incorrect time value: '' for column 't' at row 1
4. What is your TiDB version?
v8.5.7
Contributor guide
Research direction
Start by running the minimal TIME-column reproduction on TiDB v8.5.7 and compare its result with MySQL 8.0.42. Locate the handling for inserting an empty string into a TIME column and verify the behavior and error against the compatibility expectation. Done means the INSERT succeeds consistently with MySQL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, mysql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100