List:General Discussion« Previous MessageNext Message »
From:(Hal Date:October 4 2011 4:02am
Subject:Re: NULL-safe (in)equality <=>; overloaded NULL
View as plain text  
>>>> 2011/10/02 15:01 +0200, Jigal van Hemert >>>>
You are not using NULL as the original concept of it was. NULL means that the value is
undefined or unknown.
<<<<<<<<
That is quite true, especially in a table. But, almost from the beginning, NULL was
overloaded:

set @m = (select sins from emailinglist where email = 'handl@stripped');

This is allowed if the query yields at most one row. If it yields no row "@m" is made
NULL--and if field "sins" may be NULL (not in my case), the outcome is indeterminate.

With the aggregate functions MAX and MIN there is a subtler problem: over an empty set
they yield NULL, even as over a set where every matched value is NULL. It is, maybe, more
natural if MAX over an empty set yields bottom, and MIN over an empty set yields top
(likewise for BIT_OR and BIT_AND).

I once worked on a programming language with symbols for no data, bad result,
indeterminate result, .... One can go too far.

But I originally said that the symbol <=> looks more like inequality than equality.

Thread
NULL-safe (in)equality <=>hsv2 Oct
  • Re: NULL-safe (in)equality <=>Jigal van Hemert2 Oct
    • Re: NULL-safe (in)equality <=>; overloaded NULLhsv4 Oct