Re: MySQL running out of date

2003-08-24 Thread Heikki Tuuri
ffected, 1 warning (0.00 sec) mysql> select * from test3; ++ | a | ++ | -00-00 | | 1996-02-31 | | -00-00 | ++ 3 rows in set (0.03 sec) mysql> - Original Message - From: ""Hans van Harten"" <[EMAIL PROTE

Re: MySQL running out of date

2003-08-23 Thread Hans van Harten
Fred van Engen wrote: > SELECT 2147483648*2147483648*4 returns 0. > SELECT 2147483648*2147483648*2 returns -9223372036854775808. > SELECT 2147483648*2147483648*2-1 returns 9223372036854775807. > > The same problem in most programming languages. What do other DBMS do > and what do the SQL stand

Re: MySQL running out of date

2003-08-23 Thread Fred van Engen
On Sat, Aug 23, 2003 at 02:07:36PM +0200, Hans van Harten wrote: > Fred van Engen wrote: > > On Sat, Aug 23, 2003 at 10:54:32AM +0200, Hans van Harten wrote: > >> My checks might not match those of (the next version of) MySQL and > >> at that time the difference in thoughts will pass unnoticed ! >

Re: MySQL running out of date

2003-08-23 Thread Hans van Harten
Fred van Engen wrote: > On Sat, Aug 23, 2003 at 10:54:32AM +0200, Hans van Harten wrote: >> My checks might not match those of (the next version of) MySQL and >> at that time the difference in thoughts will pass unnoticed ! > I agree that MySQL should complain but I'm not sure it should fail. > The

Re: MySQL running out of date

2003-08-23 Thread Fred van Engen
On Sat, Aug 23, 2003 at 10:54:32AM +0200, Hans van Harten wrote: > Fred van Engen wrote: > > On Fri, Aug 22, 2003 at 01:16:48AM -0500, Hans van Harten wrote: > >> that comes with neither warnings nor errors reported ... > > Error reports would have been nice, but why does your application > > suppl

Re: MySQL running out of date

2003-08-23 Thread Hans van Harten
Fred van Engen wrote: > On Fri, Aug 22, 2003 at 01:16:48AM -0500, Hans van Harten wrote: >> that comes with neither warnings nor errors reported ... > Error reports would have been nice, but why does your application > supply these incorrect dates anyway? Probably because some user typed > them. An

Re: MySQL running out of date

2003-08-23 Thread Hans van Harten
Rajesh Kumar wrote: > Hans van Harten unknowingly asked us: > >> create database data_test ; >> use data_test; >> create table test3 (a date); >> insert into test3 values ( >> from_unixtime(unix_timestamp('2002-102-31'),'%Y-%m-%d' )); >> insert into test3 values ( >> from_unixt

Re: MySQL running out of date

2003-08-23 Thread Fred van Engen
On Fri, Aug 22, 2003 at 01:16:48AM -0500, Hans van Harten wrote: > Rajesh Kumar wrote: > > Peter Brawley unknowingly asked us: > >>> Interestingly, use of date_add() and date_sub() on 'odd' dates such > >>> as "Feb 31" does produce sane results. > >>> Subtract one from "2000 Feb 31", and you'll get

Re: MySQL running out of date

2003-08-21 Thread Hans van Harten
Rajesh Kumar wrote: > Peter Brawley unknowingly asked us: >>> Interestingly, use of date_add() and date_sub() on 'odd' dates such >>> as "Feb 31" does produce sane results. >>> Subtract one from "2000 Feb 31", and you'll get 2000-03-01. >> This is sane!!?? > This is where Unix Timestamps come into

Re: MySQL running out of date

2003-08-21 Thread Rajesh Kumar
Peter Brawley unknowingly asked us: Interestingly, use of date_add() and date_sub() on 'odd' dates such as "Feb 31" does produce sane results. Subtract one from "2000 Feb 31", and you'll get 2000-03-01. This is sane!!?? This is where Unix Timestamps come into action (and perhaps rescue)! To be sur

Re: MySQL running out of date

2003-08-21 Thread Hans van Harten
Kevin Fries wrote: > I agree it's unfortunate that the dates get stored. But some do seem > to prefer it this way. > > To quote the manual at the bottom of: > http://www.mysql.com/doc/en/Using_DATE.html > > If the date cannot be converted to any reasonable value, a 0 is > stored in the DATE field,

Re: MySQL running out of date

2003-08-21 Thread Peter Brawley
>Interestingly, use of date_add() and date_sub() on 'odd' dates such as >"Feb 31" does produce sane results. >Subtract one from "2000 Feb 31", and you'll get 2000-03-01. This is sane!!?? PB [mysql]

RE: MySQL running out of date

2003-08-21 Thread Kevin Fries
:[EMAIL PROTECTED] > Sent: Thursday, August 21, 2003 3:05 PM > To: [EMAIL PROTECTED] > Subject: Re: MySQL running out of date > > > Adam Clauss and Rajesh Kumar wrote: > >> Hans van Harten unknowingly asked us: > LOL > >>> Some make the laughing stock of

Re: MySQL running out of date

2003-08-21 Thread Hans van Harten
Adam Clauss and Rajesh Kumar wrote: >> Hans van Harten unknowingly asked us: LOL >>> Some make the laughing stock of MySQL with this code: >>> create database data_test ; >>> use data_test; >>> create table test3 (a date); >>> insert into test3 values (-1); >>> insert into test3

RE: MySQL running out of date

2003-08-21 Thread Brian Austin
As per the manual that is correct. The only correct date will be 1996-02-31. what is the problem? -Original Message- From: Hans van Harten [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 4:09 PM To: [EMAIL PROTECTED] Subject: MySQL running out of date Some make the laughing

RE: MySQL running out of date

2003-08-21 Thread Adam Clauss
ECTED] > Subject: Re: MySQL running out of date > > > Hans van Harten unknowingly asked us: > > Some make the laughing stock of MySQL with this code: > > create database data_test ; > > use data_test; > > create table test3 (a date); > > i

Re: MySQL running out of date

2003-08-21 Thread Rajesh Kumar
Hans van Harten unknowingly asked us: Some make the laughing stock of MySQL with this code: create database data_test ; use data_test; create table test3 (a date); insert into test3 values (-1); insert into test3 values ('1996-02-31'); insert into test3 values ('1996-67-31')

MySQL running out of date

2003-08-21 Thread Hans van Harten
Some make the laughing stock of MySQL with this code: create database data_test ; use data_test; create table test3 (a date); insert into test3 values (-1); insert into test3 values ('1996-02-31'); insert into test3 values ('1996-67-31'); select * from test3; I ran it o