List:General Discussion« Previous MessageNext Message »
From:root Date:February 17 2000 6:17am
Subject: NULL Bug?
View as plain text  
>Description:
I noticed that using TO_DAYS('0000-00-00 00:00:00') is NULL, great so I can index
a date column and use 0000 as a NULL substitute. It all gets a bit weird!!!

>How-To-Repeat:
This doesn't work:

mysql> SELECT EnduserID, Cardname, TO_DAYS(PackageCancelled)
mysql> FROM EndUsers WHERE TO_DAYS(PackageCancelled) IS NULL AND Cardname = 'Mona M
> Samara';
+-----------+---------------+---------------------------+
| EnduserID | Cardname      | TO_DAYS(PackageCancelled) |
+-----------+---------------+---------------------------+
|      5699 | Mona M Samara |                    730441 |
+-----------+---------------+---------------------------+
1 row in set (0.74 sec)

This does:

mysql> SELECT EnduserID, Cardname, TO_DAYS(PackageCancelled)
mysql> FROM EndUsers WHERE TO_DAYS(PackageCancelled) IS NULL AND EndUserID = 5699;
Empty set (0.00 sec)

>Fix:
	

>Submitter-Id:	<submitter ID>
>Originator:	rnice@stripped
>Organization:
 
>MySQL support: none
>Synopsis:	NULL Bug?
>Severity:	
>Priority:	
>Category:	mysql
>Class:		
>Release:	mysql-3.22.25 (Source distribution)

>Environment:
	
System: Linux mbs 2.2.5-15 #1 Mon Apr 19 23:00:46 EDT 1999 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
Configure command: ./configure 
Perl: This is perl, version 5.005_03 built for i686-linux
Thread
NULL Bug?root17 Feb
  • Re: NULL Bug?Thimble Smith17 Feb