-
Type:
Bug
-
Status: Confirmed (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.4.11, 10.4
-
Component/s: Server
-
Labels:None
-
Environment:Ubuntu 19.04
Consider the following statements:
CREATE TABLE t0(c0 INT NOT NULL, c1 CHAR UNIQUE);
|
INSERT INTO t0 VALUES (0, 1);
|
INSERT INTO t0 VALUES (0, '');
|
SELECT SUM(a.t) FROM (SELECT (c1 RLIKE c1) = (c0 IS NULL) as t FROM t0) as a; -- expected: 1, actual: 0
|
I would expect SUM() to yield 1, because the expression evaluates to TRUE for one row:
SELECT (c1 RLIKE c1) = (c0 IS NULL) FROM t0; -- 1, 0
|