|Title:||MIN() malfunctions for UNIQUE column|
|Last Modified:||2019-08-02 19:40:53|
|Version Found In:||3.29.0|
mrigger added on 2019-08-02 16:11:33:
Consider the following test case:
CREATE TABLE t0(c0 UNIQUE, c1); INSERT INTO t0(c0, c1) VALUES (NULL, 1); SELECT MIN(t0.c0), t0.c1 FROM t0; -- expected: NULL | 1, actual: NULL | NULL
Unexpectedly, a fabricated NULL value for the bare column c1 is returned. Removing the UNIQUE constraint on c0 does not trigger this bug. This also works as expected for other aggregate functions, such as MAX().
dan added on 2019-08-02 19:40:53:
Fixed by [faaaae49].