Hi!
>>>>> "oliver" == oliver <[EMAIL PROTECTED]> writes:
>> Description:
oliver> I have found some inconsistencies (one may call them bugs ;-) in the
oliver> current MySQL 3.23 version. I tested this on Linux and Solaris 2.8
oliver> so this should not be platform specific...
oliver> The result differs, if one uses the constant value "0000-00-00" or
oliver> if one uses a column which has the value "0000-00-00".
oliver> The following functions are affected: DAYOFMONTH, DAYOFYEAR, MONTH,
oliver> QUARTER, WEEK, YEAR, YEARWEEK, TO_DAYS, DATE_FORMAT and EXTRACT.
oliver> Not tested: DATE_ADD, DATE_SUB, ADDDATE and SUBDATE.
>> How-To-Repeat:
oliver> CREATE TABLE xx ( Gueltig DATE NOT NULL );
oliver> INSERT INTO xx VALUES ( "0000-00-00" );
oliver> SELECT DAYOFYEAR("0000-00-00"),Gueltig,DAYOFYEAR(Gueltig) FROM xx;
oliver> +-------------------------+------------+--------------------+
oliver> | DAYOFYEAR("0000-00-00") | Gueltig | DAYOFYEAR(Gueltig) |
oliver> +-------------------------+------------+--------------------+
oliver> | NULL | 0000-00-00 | -730484 |
oliver> +-------------------------+------------+--------------------+
oliver> 1 row in set (0.00 sec)
<cut>
We will fix for 3.23.44 that 0000-00-00 should work identically if you
are using a column or a constant.
Regards,
Monty
--
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php