Bug #112853 | Wrong functional dependency in ONLY_FULL_GROUP_BY mode | ||
---|---|---|---|
Submitted: | 27 Oct 2023 8:32 | Modified: | 18 Dec 2023 2:17 |
Reporter: | Xinhao Zhao | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[27 Oct 2023 8:32]
Xinhao Zhao
[27 Oct 2023 8:51]
MySQL Verification Team
Hello Xinhao Zhao, Thank you for the report and testcase. regards, Umesh
[13 Dec 2023 11:30]
shan he
Could you please confirm whether the simplification process we applied has been helpful for developers in diagnosing and addressing this issue? Although not obvious for this example, it removes "dt.b = t1.b AND". Here's our output ***** CREATE TABLE t1 (a int primary key, b int); INSERT INTO t1 VALUES (1, 1), (2, 3); SELECT dt.a, dt.b FROM t1 LEFT JOIN (SELECT t2.a, COALESCE(t2.a, 3) as b FROM t1 LEFT JOIN t1 AS t2 ON t1.a = t2.b) dt ON t1.b <> 1; +------+---+ | a | b | +------+---+ | NULL | NULL | | NULL | 3 | | 1 | 1 | +------+---+ SELECT dt.a, dt.b FROM t1 LEFT JOIN (SELECT t2.a, COALESCE(t2.a, 3) as b FROM t1 LEFT JOIN t1 AS t2 ON t1.a = t2.b) dt ON t1.b <> 1 GROUP BY dt.a; +------+------+ | a | b | +------+------+ | NULL | NULL | | 1 | 1 | +------+------+
[18 Dec 2023 2:17]
Xinhao Zhao
Yes. The bug exhibited by this simplified statement is consistent with the original statement.