[MDEV-15324] Implicit and explicit conversion to DATE/TIME from empty/bad values works inconsistently Created: 2018-02-15 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Temporal Types |
| Affects Version/s: | 10.2, 10.3 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
During implicit conversion on INSERT, empty/bad values are translated to zero datetime values:
Explicit conversion using CAST translates empty/bad values to NULL:
However, when CAST is in a comparison, it translates empty/bad values to zero datetime again:
Note, when fixing it, please mind this special behaviour for how IS NULL treats zero dates in NOT NULL datetime columns: |