Re: Weird behavior with date(null) and if

2007-12-14 Thread Daniel Mikic
Baron Schwartz schrieb: > On Dec 13, 2007 4:18 PM, Daniel Mikic <[EMAIL PROTECTED]> wrote: > >> Baron Schwartz wrote: >> >> Hi, >> >> On Dec 13, 2007 3:53 PM, Daniel Mikic <[EMAIL PROTECTED]> wrote: >> >> >> Hi, i hit a weird behavior: >> >> select date(null); #result is null >> select if(dat

Re: Weird behavior with date(null) and if

2007-12-13 Thread Baron Schwartz
On Dec 13, 2007 4:18 PM, Daniel Mikic <[EMAIL PROTECTED]> wrote: > > Baron Schwartz wrote: > > Hi, > > On Dec 13, 2007 3:53 PM, Daniel Mikic <[EMAIL PROTECTED]> wrote: > > > Hi, i hit a weird behavior: > > select date(null); #result is null > select if(date(null) is null, 1, 2); #result is 2 (no

Re: Weird behavior with date(null) and if

2007-12-13 Thread Daniel Mikic
Baron Schwartz wrote: > Hi, > > On Dec 13, 2007 3:53 PM, Daniel Mikic <[EMAIL PROTECTED]> wrote: > >> Hi, i hit a weird behavior: >> >> select date(null); #result is null >> select if(date(null) is null, 1, 2); #result is 2 (not null) >> select if(date(null) is not null, 1, 2); #result is 1 >> >> I

Re: Weird behavior with date(null) and if

2007-12-13 Thread Baron Schwartz
Hi, On Dec 13, 2007 3:53 PM, Daniel Mikic <[EMAIL PROTECTED]> wrote: > Hi, i hit a weird behavior: > > select date(null); #result is null > select if(date(null) is null, 1, 2); #result is 2 (not null) > select if(date(null) is not null, 1, 2); #result is 1 > > I use mysql version 5.0.32-Debian_7et

Weird behavior with date(null) and if

2007-12-13 Thread Daniel Mikic
Hi, i hit a weird behavior: select date(null); #result is null select if(date(null) is null, 1, 2); #result is 2 (not null) select if(date(null) is not null, 1, 2); #result is 1 I use mysql version 5.0.32-Debian_7etch1-log. Is this a bug and if not, can anyone explain why? Thanks, Daniel --