Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Won't Fix
-
5.3.12
-
None
-
None
Description
The following test case produces wrong result:
CREATE TABLE t1 (a INT);
|
INSERT INTO t1 VALUES (7),(0);
|
CREATE TABLE t2 (b INT);
|
|
|
SELECT SUM(a), a FROM (t1, t2) WHERE t1.a >= 4;
|
+--------+------+
|
| SUM(a) | a |
|
+--------+------+
|
| NULL | NULL |
|
+--------+------+
|
1 row in set (0.00 sec)
|
|
|
SELECT SUM(a), a FROM t1, t2 WHERE t1.a >= 4;
|
+--------+------+
|
| SUM(a) | a |
|
+--------+------+
|
| 7 | 7 |
|
+--------+------+
|
The only difference between the queries are the braces in the FROM clause.
This test case was extracted from bug lp:1002079.