Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.3.2, 11.4.1
-
None
-
None
-
None
-
Run on Docker container mariadb:latest and mariadb:11.4-rc
Description
Consider the below queries, it is unexpected that two queries both return 0.
The Null-safe equal returns `1` if both operands are `NULL`. Thus the second query should return `1`, since `t0.c1` is `NULL`, and thus the expression `t0.c1<=>t0.c1 IS NULL` should be evaluated to `0`, and `NOT 0` is `1`.
DROP DATABASE db0; |
CREATE DATABASE db0; |
USE db0; |
|
CREATE TABLE t0(c1 INT); |
INSERT INTO t0 (c1) VALUES (NULL); |
|
SELECT (t0.c1<=>t0.c1) IS NULL FROM t0; -- 0 |
SELECT NOT ((t0.c1<=>t0.c1) IS NULL) FROM t0; -- 0 (unexpected) |
Attachments
Issue Links
- relates to
-
MDEV-21029 Incorrect result for expression with the <=> operator and IS NULL
- Closed