| Bug #28858 | Wrong output for greatest combined with coalesce | ||
|---|---|---|---|
| Submitted: | 3 Jun 2007 18:33 | Modified: | 6 Jun 2007 12:20 |
| Reporter: | Ioannis Psarras | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
| Version: | 5.0.27-community-nt | OS: | Windows |
| Assigned to: | CPU Architecture: | Any | |
[4 Jun 2007 4:42]
Valeriy Kravchuk
Thank you for a problem report. Please, send the results of: show variables like 'sql_mode'; from the same environment.
[4 Jun 2007 9:15]
Ioannis Psarras
mysql> show variables like 'sql_mode'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | sql_mode | | +---------------+-------+ 1 row in set mysql>
[4 Jun 2007 11:32]
Sveta Smirnova
Thank you for the report. I can not repeat described behaviour using current development sources, but can with older versions. So I close the report as "Can't repeat".
[6 Jun 2007 12:20]
Ioannis Psarras
its very strange. So what if someone wants to get the max of a series of dates (possibly null). It seems like a functionality that people ask for.

Description: mysql> select greatest(coalesce('2007-06-02 22:50:12',date(0)),coalesce(null,date(0)),coalesce('2007-06-02 23:50:12',date(0))) as a; +------+ | a | +------+ | NULL | +------+ 1 row in set How to repeat: try the above command