Skip to content

Commit

Permalink
add method
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycs520 committed May 31, 2019
1 parent fad921c commit 17d926e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ func (t *TableInfo) FindIndexByName(idxName string) *IndexInfo {
return nil
}

// IsLocked checks whether the table was locked.
func (t *TableInfo) IsLocked(idxName string) bool {
return t.Lock != nil && len(t.Lock.Sessions) > 0
}

// NewExtraHandleColInfo mocks a column info for extra handle column.
func NewExtraHandleColInfo() *ColumnInfo {
colInfo := &ColumnInfo{
Expand Down

0 comments on commit 17d926e

Please sign in to comment.