File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -125,24 +125,22 @@ func (e *RowEvent) PrimaryKeyColumnNames() []string {
125
125
var result []string
126
126
127
127
result = make ([]string , 0 )
128
- tableInfo := e .TableInfo
129
128
columns := e .TableInfo .GetColumns ()
130
129
for _ , col := range columns {
131
130
if col != nil && mysql .HasPriKeyFlag (col .GetFlag ()) {
132
- result = append (result , tableInfo . ForceGetColumnName ( col .ID ) )
131
+ result = append (result , col .Name . O )
133
132
}
134
133
}
135
134
return result
136
135
}
137
136
138
137
// PrimaryKeyColumn return all primary key's indexes and column infos
139
- func (e * RowEvent ) PrimaryKeyColumn () ([]int , []* model .ColumnInfo ) {
140
- infos := make ([]* model .ColumnInfo , 0 )
138
+ func (e * RowEvent ) PrimaryKeyColumn () ([]int , []* timodel .ColumnInfo ) {
139
+ infos := make ([]* timodel .ColumnInfo , 0 )
141
140
index := make ([]int , 0 )
142
- tableInfo := e .TableInfo
143
141
columns := e .TableInfo .GetColumns ()
144
142
for i , col := range columns {
145
- if col != nil && tableInfo . ForceGetColumnFlagType (col .ID ). IsPrimaryKey ( ) {
143
+ if col != nil && mysql . HasPriKeyFlag (col .GetFlag () ) {
146
144
infos = append (infos , col )
147
145
index = append (index , i )
148
146
}
You can’t perform that action at this time.
0 commit comments