-
Roy Lyseng authored
The problem query here has a HAVING clause which is const and resolves to a TRUE value. The HAVING condition is thus eliminated and replaced with a NULL pointer. However, the query then looses state as an "aggregated" query, and deletion is attempted, even though aggregation is not allowed in a DELETE statement. The solution is to leave a TRUE condition in HAVING so that query block is still aggregated. Also move const elimination of HAVING to after ROLLUP resolving, since it may affect the nullability of the HAVING condition. Reviewed by: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Roy Lyseng authoredThe problem query here has a HAVING clause which is const and resolves to a TRUE value. The HAVING condition is thus eliminated and replaced with a NULL pointer. However, the query then looses state as an "aggregated" query, and deletion is attempted, even though aggregation is not allowed in a DELETE statement. The solution is to leave a TRUE condition in HAVING so that query block is still aggregated. Also move const elimination of HAVING to after ROLLUP resolving, since it may affect the nullability of the HAVING condition. Reviewed by: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Loading