From: Peter Brawley Date: May 10 2005 8:53pm Subject: Re: Comparing to null queries List-Archive: http://lists.mysql.com/mysql/183902 Message-Id: <42811F45.8040200@earthlink.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=======AVGMAIL-42811F4542A0=======" --=======AVGMAIL-42811F4542A0======= Content-Type: multipart/alternative; boundary=------------090402010903020700060904 --------------090402010903020700060904 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mike, If 3.23.22 gave (NULL != 1) = TRUE,/ that/ was a bug, because in SQL, (NULL != 1) is NULL. This 3.23.26 change history item might be your culprit: "Fixed `<>' to work properly with `NULL'." PB ----- Mike Rykowski wrote: >Hello, > >I have a query: > >select * from table where del != "1"; > >Let's assume that I have a record where del is null (del is a single >character field). > >In version 3.23.22-beta I get the record returned with the above query, >in version 4.1.10a I get nothing returned. > >Did something change between these versions or is this a bug? I >couldn't find anything specific to this on the archives. > >TIA > > --------------090402010903020700060904 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mike,

If 3.23.22 gave (NULL != 1) = TRUE, that was a bug, because in SQL, (NULL != 1) is NULL.

This 3.23.26 change history item might be your culprit: "Fixed `<>' to work properly with `NULL'."

PB

-----


Mike Rykowski wrote:
Hello,

I have a query:

select * from table where del != "1";

Let's assume that I have a record where del is null (del is a single
character field).

In version 3.23.22-beta I get the record returned with the above query,
in version 4.1.10a I get nothing returned.

Did something change between these versions or is this a bug?  I
couldn't find anything specific to this on the archives.

TIA
  
--------------090402010903020700060904-- --=======AVGMAIL-42811F4542A0======= Content-Type: text/plain; x-avg=cert; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-Description: "AVG certification" No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 5/10/2005 --=======AVGMAIL-42811F4542A0=======--