[MDEV-8778] Temporal fields with zero dates do not respect sql_mode=traditional Created: 2015-09-09 Updated: 2019-04-26 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Temporary |
| 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: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | datatype | ||
| Issue Links: |
|
||||||||
| Description |
|
This script:
returns these results as expected:
Now if I change sql_mode and rerun the query:
it returns
Notice, the function DATE() respects TRADITIONAL (which includes NO_ZERO_DATES), but the field does not. Equality with a zero date is also allowed in sql_mode=TRADITIONAL:
It's not clear that the expected behavior would be and needs a discussion. |