[MDEV-11341] STR_TO_DATE does not return NULL for invalid dates Created: 2016-11-23 Updated: 2019-04-22 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Temporal Types |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | upstream | ||
| Description |
|
According to specification, it should be NULL for invalid date values.
Found on stackoverflow. |
| Comments |
| Comment by Alexander Barkov [ 2019-04-22 ] | |||||||||
|
Just tested with MySQL-5.7.25:
It returns NULL, but not because if an invalid date: the reason is a wrong delimiter. With a correct delimiter it still returns an invalid date '1949-02-30'. | |||||||||
| Comment by Elena Stepanova [ 2019-04-22 ] | |||||||||
|
My bad, I mixed up different SQL statements while converting the StackOverflow question into a bug report. There was a claim that some hackish sequence of ALTER/UPDATE statements was working differently on 5.7 comparing to 10.1, most likely i was trying to simplify that one but took a wrong turn. |