Skip to content

Predicate expression optimizer causes segmentation fault with version 19.13.3.26 #7136

@ghost

Description

When set the enable_optimize_predicate_expression to 1, the following query will cause segmentation fault.

SET enable_optimize_predicate_expression = 1;
SELECT
    ccc
FROM
(
    SELECT 1 AS ccc
    UNION ALL
    SELECT *
    FROM
    (
        SELECT 2 AS ccc
    )
    ANY INNER JOIN
    (
        SELECT 2 AS ccc
    ) USING (ccc)
)
WHERE ccc > 1;

But do any of the following operation, the query will wok.

  • Set the enable_optimize_predicate_expression to 0
  • Remove SELECT 1 AS ccc or WHERE ccc > 1 or the JOIN subquery
  • Replace * by ccc

Metadata

Metadata

Assignees

Labels

bugConfirmed user-visible misbehaviour in official releasecomp-query-optimizerQuery plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa...crashCrash / segfault / abortst-acceptedThe issue is in our backlog, ready to take

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions