(v *plannercore.CheckTable)
| 503 | } |
| 504 | |
| 505 | func (b *executorBuilder) buildCheckTable(v *plannercore.CheckTable) exec.Executor { |
| 506 | noMVIndexOrPrefixIndexOrVectorIndex := true |
| 507 | for _, idx := range v.IndexInfos { |
| 508 | if idx.MVIndex || idx.VectorInfo != nil { |
| 509 | noMVIndexOrPrefixIndexOrVectorIndex = false |
| 510 | break |
| 511 | } |
| 512 | for _, col := range idx.Columns { |
| 513 | if col.Length != types.UnspecifiedLength { |
| 514 | noMVIndexOrPrefixIndexOrVectorIndex = false |
| 515 | break |
| 516 | } |
| 517 | } |
| 518 | if !noMVIndexOrPrefixIndexOrVectorIndex { |
| 519 | break |
| 520 | } |
| 521 | } |
| 522 | if b.ctx.GetSessionVars().FastCheckTable && noMVIndexOrPrefixIndexOrVectorIndex { |
| 523 | e := &FastCheckTableExec{ |
| 524 | BaseExecutor: exec.NewBaseExecutor(b.ctx, v.Schema(), v.ID()), |
| 525 | dbName: v.DBName, |
| 526 | table: v.Table, |
| 527 | indexInfos: v.IndexInfos, |
| 528 | is: b.is, |
| 529 | } |
| 530 | return e |
| 531 | } |
| 532 | |
| 533 | readerExecs := make([]*IndexLookUpExecutor, 0, len(v.IndexLookUpReaders)) |
| 534 | for _, readerPlan := range v.IndexLookUpReaders { |
| 535 | readerExec, err := buildNoRangeIndexLookUpReader(b, readerPlan) |
| 536 | if err != nil { |
| 537 | b.err = errors.Trace(err) |
| 538 | return nil |
| 539 | } |
| 540 | buildIndexLookUpChecker(b, readerPlan, readerExec) |
| 541 | |
| 542 | readerExecs = append(readerExecs, readerExec) |
| 543 | } |
| 544 | |
| 545 | e := &CheckTableExec{ |
| 546 | BaseExecutor: exec.NewBaseExecutor(b.ctx, v.Schema(), v.ID()), |
| 547 | dbName: v.DBName, |
| 548 | table: v.Table, |
| 549 | indexInfos: v.IndexInfos, |
| 550 | is: b.is, |
| 551 | srcs: readerExecs, |
| 552 | exitCh: make(chan struct{}), |
| 553 | retCh: make(chan error, len(readerExecs)), |
| 554 | checkIndex: v.CheckIndex, |
| 555 | } |
| 556 | return e |
| 557 | } |
| 558 | |
| 559 | func buildIdxColsConcatHandleCols(tblInfo *model.TableInfo, indexInfo *model.IndexInfo, hasGenedCol bool) []*model.ColumnInfo { |
| 560 | var pkCols []*model.IndexColumn |
no test coverage detected