[MDEV-16926] CAST(COALESCE(year_field)) returns wrong value Created: 2018-08-09 Updated: 2018-11-03 Resolved: 2018-08-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types, Temporal Types |
| Affects Version/s: | 10.0, 10.1, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.4.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
This script:
produces the following output:
NULL in the second column is wrong. Both columns should return the same value, without warnings. This happens because Type_handler_year has a special implementation in Item_get_date():
but does not have a similar implementation for Item_func_hybrid_field_type_get_date(). |