| Bug #79111 | w/ DATE_FORMAT, NULLIF works together, incorrect result is returned | ||
|---|---|---|---|
| Submitted: | 4 Nov 2015 5:57 | Modified: | 4 Nov 2015 6:32 |
| Reporter: | Su Dylan | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
| Version: | 5.7.8, 5.6.27, 5.7.9 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | regression | ||
[4 Nov 2015 6:32]
MySQL Verification Team
Hello Su Dylan, Thank you for the report and test case. Thanks, Umesh

Description: Output: ======= mysql> SELECT date_format(NULLIF('2015-01-01','2015-01-02'), '%Y'); +------------------------------------------------------+ | date_format(NULLIF('2015-01-01','2015-01-02'), '%Y') | +------------------------------------------------------+ | NULL | +------------------------------------------------------+ 1 row in set, 2 warnings (0.00 sec) mysql> select version(); +-----------+ | version() | +-----------+ | 5.7.8-rc | +-----------+ 1 row in set (0.00 sec) Problem: ======== '2015' is expected. How to repeat: SELECT date_format(NULLIF('2015-01-01','2015-01-02'), '%Y'); Suggested fix: '2015' is returned.