Skip to content

If the table is an empty, an optimization don't work when add index  #49682

@zimulala

Description

@zimulala

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

If the table is empty, some optimizations don't work when add index. And if it works, that will be a bug for ingest add index.

don't worker code:

tidb/pkg/ddl/backfilling.go

Lines 676 to 678 in b1e5d61

if startKey == nil && endKey == nil {
return nil
}

If works, here will return an error: ingest engine not found

err = bc.FinishImport(indexInfo.ID, indexInfo.Unique, tbl)

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

the optimizations can work and haven't errors.

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

master

Metadata

Metadata

Assignees

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.component/ddlThis issue is related to DDL of TiDB.severity/minortype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions