Skip to content

UNION ALL might return error when the first child is table dual #48755

@winoros

Description

@winoros

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a int, b int);
set @@tidb_max_chunk_size=32;
select a from (select 100 as a, 100 as b union all select * from t) t where b != 0;

make sure that the number of satisfied rows from t is more than 32.

2. What did you expect to see? (Required)

Return the correct result.

3. What did you see instead (Required)

Error thrown Internal error: UnionExec chunk column count mismatch, req: 2, result: 1

4. What is your TiDB version? (Required)

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.report/customerCustomers have encountered this bug.severity/moderatesig/plannerSIG: Plannertype/bugThe issue is confirmed as a bug.type/regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions