Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zimulala opened this issue Dec 21, 2023 · 0 comments · Fixed by #49629
Closed

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

zimulala opened this issue Dec 21, 2023 · 0 comments · Fixed by #49629
Assignees
Labels
affects-6.5 affects-7.1 affects-7.5 component/ddl This issue is related to DDL of TiDB. severity/minor type/bug This issue is a bug.

Comments

@zimulala
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.1 affects-7.5 component/ddl This issue is related to DDL of TiDB. severity/minor type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant