[MDEV-9521] Least function returns 0000-00-00 for null date columns instead of null Created: 2016-02-04 Updated: 2016-06-16 Resolved: 2016-04-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Subquery |
| Affects Version/s: | 5.5.47, 5.5 |
| Fix Version/s: | 5.5.49 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marc Langevin | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
mysql Ver 15.1 Distrib 5.5.47-MariaDB, for Linux (x86_64) using readline 5.1 Linux version 2.6.32-573.12.1.el6.x86_64 (mockbuild@x86-031.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Mon Nov 23 12:55:32 EST 2015 |
||
| Issue Links: |
|
||||||||||||||||
| Description |
|
sql_mode is set to ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION The problem can be reproduce with the following commands:
On 5.5.44 result is:
The blank is a null. On 5.5.47, result is:
Notice also that date_fin column appears as a date_time column now in 5.5.47. |
| Comments |
| Comment by Elena Stepanova [ 2016-02-06 ] | ||||||||
|
Thanks for the report and test case. I'm actually getting the same result on MariaDB 5.5.44, maybe you tried MySQL 5.5.44?
However, it seems to be a 5.5-only problem, 10.0 and higher return NULL. Is it the same for you? If so, probably it makes no sense to fix it in 5.5 separately. I'll assign it to bar to check if it's really solved in 10.0, and if so, to decide whether anything needs to be done in 5.5. | ||||||||
| Comment by Marc Langevin [ 2016-02-08 ] | ||||||||
|
Hi Elena, The test was done on MariaDb 5.5.44. We have about 30 instances running on 5.5.x. From development to production instances. Regards, | ||||||||
| Comment by Marc Langevin [ 2016-02-08 ] | ||||||||
|
And we do not have any 10.x instance installed. Marc | ||||||||
| Comment by Alexander Barkov [ 2016-02-09 ] | ||||||||
|
A smaller scrip demonstrating the same problem:
It returns:
| ||||||||
| Comment by Marc Langevin [ 2016-02-11 ] | ||||||||
|
For your information, although you probably already know, the problem is still there in 5.5.48. Can we expect the fix to be included in 5.5.49? Regards, | ||||||||
| Comment by Sergei Golubchik [ 2016-02-11 ] | ||||||||
|
Yes, absolutely. Unfortunately, the fix didn't make it into 5.5 before the 5.5.48 deadline. But the fix is ready, so it cannot miss 5.5.49 | ||||||||
| Comment by Marc Langevin [ 2016-02-11 ] | ||||||||
|
Thank you for your reply. Is the 5.5.49 deadline known? | ||||||||
| Comment by Sergei Golubchik [ 2016-02-12 ] | ||||||||
|
Strictly speaking — no. We can only release MariaDB-5.5.49 after MySQL-5.5.49, and Oracle doesn't make promises about specific release dates. But practically, MySQL (and we) were making 5.5 releases every second month. So, the tentative 5.5.49 release date is two months from now, 2016-04-14. | ||||||||
| Comment by Marc Langevin [ 2016-02-12 ] | ||||||||
|
Thank you Sergei. | ||||||||
| Comment by Marc [ 2016-04-18 ] | ||||||||
|
Hi, Regards, Marc | ||||||||
| Comment by Alexander Barkov [ 2016-04-18 ] | ||||||||
|
Marc, | ||||||||
| Comment by Marc [ 2016-04-18 ] | ||||||||
|
Thank you! |