From: Daevid Vincent Date: August 27 2007 11:56pm Subject: BUG: DATE_ADD 99999 fails, but 9999 works. List-Archive: http://lists.mysql.com/mysql/208748 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable using 99999 as the DATE_ADD interval value will result in 000-00-00 but one less 9 will work. root# mysql --version mysql Ver 14.12 Distrib 5.0.41, for pc-linux-gnu (i686) using EditLine wrapper CREATE TABLE `Users` (=20 `CoreID` int(10) unsigned NOT NULL auto_increment, `Username` varchar(155) default NULL, `Password` varchar(64) default NULL,=20 `password_expire` timestamp NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`CoreID`) ) ENGINE=3DInnoDB DEFAULT CHARSET=3Dutf8; UPDATE Users SET password_expire =3D DATE_ADD(CURRENT_DATE(),INTERVAL = 9999 DAY) WHERE CoreID =3D 1 LIMIT 1; UPDATE Users SET password_expire =3D DATE_ADD(CURRENT_DATE(),INTERVAL 99999 DAY) WHERE CoreID =3D 1 LIMIT 1; =20 Added as bug: http://bugs.mysql.com/bug.php?id=3D30656 Added as a tip: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html BTW, it's extremely obnoxious that when I enter in a comment on that page, then choose "bug" from the select box, it throws me to another page that says, "Sorry, but this is not the correct place to report bugs. You need to report bugs using our online bug reporting system. You can start filling out a bug report with the text you have already entered by clicking the following button:" ... Well why the heck did you let me choose that option then! UGH!=20 =D0=C65=CF=D0=20