Bug #28835 current_date - 1 returns non existent date
Submitted: 1 Jun 2007 13:08 Modified: 1 Jun 2007 17:49
Reporter: Andrey Smirnov Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.0.41 OS:Linux
Assigned to: CPU Architecture:Any
Tags: SELECT current_date -1

[1 Jun 2007 13:08] Andrey Smirnov
Description:
I execute some query each day. But every first day of month current_date -1 returns not previous date but 2006-06-00 if I execute it  2006-06-01 etc...

How to repeat:
Execute "select current_date - 1"  on first day of month
[1 Jun 2007 13:15] Andrey Smirnov
changed title
[1 Jun 2007 17:49] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

You use DATE in numeric context. See also http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html