diff --git a/executor/executor.go b/executor/executor.go index 1a830e07fb699..6d1ec92dcc876 100644 --- a/executor/executor.go +++ b/executor/executor.go @@ -465,6 +465,9 @@ func (e *CheckTableExec) doCheckPartitionedTable(tbl table.PartitionedTable) err func (e *CheckTableExec) doCheckTable(tbl table.Table) error { for _, idx := range tbl.Indices() { + if idx.Meta().State != model.StatePublic { + continue + } txn := e.ctx.Txn(true) err := admin.CompareIndexData(e.ctx, txn, tbl, idx, e.genExprs) if err != nil {