Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.6.0
-
None
Description
There is an inconsistency in the results when using the COALESCE function.
Set up table t0:
CREATE TABLE t0 (c0 BIT, c1 BIT); |
INSERT INTO t0 VALUES (0, 1); |
Use COALESCE in a SELECT query:
(SELECT (COALESCE(t0.c0, t0.c1)) AS c0 FROM t0); |
--Result: 48 |
Store the result of COALESCE in another table t1 and SELECT:
CREATE TABLE t1 AS (SELECT (COALESCE(t0.c0, t0.c1)) AS c0 FROM t0); |
SELECT * FROM t1; |
--Result: 0 |
The result should be consistent regardless of whether the result is directly selected or stored in another table.
Attachments
Issue Links
- duplicates
-
MDEV-34792 Inconsistent Results When Using NULLIF
- Confirmed