Skip to content

NULL's operator "<=>" get wrong result #1492

@chenhao7253886

Description

@chenhao7253886

now , the result of comparing null with other value by operator "<=>" is wrong, for example:
mysql> select null <=> null;
+-------------+
| NULL = NULL |
+-------------+
| NULL |
+-------------+
1 row in set (0.00 sec)
the result is wrong, the right result is:
mysql> select null <=> null;
+-------------+
| NULL = NULL |
+-------------+
| 1 |
+-------------+
1 row in set (0.01 sec)
Operator "<=>" is safe for null's comparing,so it will return 1 or 0. This operator is the same as "=" operator when comparing non-null value, but it will return 1 or 0 for comparing "null" with "null" or other non-null value.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions