Skip to content
  • Roy Lyseng's avatar
    49c60ca8
    Bug#31429865: Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type == 1' failed. · 49c60ca8
    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>
    49c60ca8
    Bug#31429865: Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type == 1' failed.
    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>
Loading