Bug #1960 date_format() returns spurious '-' for valid dates
Submitted: 26 Nov 2003 8:01 Modified: 26 Nov 2003 8:32
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:Any (all)
Assigned to: Guilhem Bichot CPU Architecture:Any

[26 Nov 2003 8:01] Guilhem Bichot
Description:
see how-to-repeat

How to repeat:
create table t1 (d date);
insert into t1 values ('2004-07-14'),('2005-07-14');
select date_format(d,"%d") from t1 order by 1;

I get
-14
-14

Depending on the exact query, there can be one or two -14.

Suggested fix:
Valgrind showed an unitialized value for ltime->neg in some place. Pushing a fix.
[26 Nov 2003 8:32] Guilhem Bichot
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
    http://www.mysql.com/doc/en/Installing_source_tree.html

ChangeSet@1.1625, 2003-11-26 17:06:24+01:00, guilhem@mysql.com