Description:
The manual makes a wrong statement about the '=' (equality) comparison operator:
In page 'comparison-operators.html' when describing the 'ISNULL()' predicate, it states
> ISNULL() can be used instead of = to test whether a value is NULL.
> (Comparing a value to NULL using = always yields false.)
The bracketed sentence is terribly wrong, such comparisons always (correctly) return NULL (the "unknown" result):
mysql> select 0 = NULL, 1 = NULL, NULL = NULL ;
+----------+----------+-------------+
| 0 = NULL | 1 = NULL | NULL = NULL |
+----------+----------+-------------+
| NULL | NULL | NULL |
+----------+----------+-------------+
1 row in set (0,00 sec)
The description of the 'isnull()' function itself is correct:
mysql> select isnull(0), isnull(1), isnull(NULL) ;
+-----------+-----------+--------------+
| isnull(0) | isnull(1) | isnull(NULL) |
+-----------+-----------+--------------+
| 0 | 0 | 1 |
+-----------+-----------+--------------+
1 row in set (0,00 sec)
How to repeat:
Check the manual for 5.5, 5.6 or 5.7.
To verify MySQL works correct, run the first "select" command above.
Suggested fix:
The bracketed sentence must read:
Comparing a value to NULL using = always yields NULL, representing the "unknown" truth value.