Bug #910 IFNULL works only with strings and numers
Submitted: 24 Jul 2003 8:15 Modified: 27 Aug 2003 23:54
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.0-alpha OS:Windows (Windows)
Assigned to: Bugs System CPU Architecture:Any

[24 Jul 2003 8:15] [ name withheld ]
The function IFNULL returns always a number or a string, it's not possible to use it with DATE or TIMESTAMP

How to repeat:
create table mytable (mydatefield date);

select ifnull(mydatefield,cast('2000-01-01' as date)) as ddd from mytable;

in the resultset the column ddd isn't a date (but a char)
[27 Aug 2003 23:54] Victor Vagin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at