Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wk989898 committed Jan 6, 2025
1 parent 7adf517 commit c258dfc
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 327 deletions.
9 changes: 0 additions & 9 deletions pkg/filter/sql_event_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ func (f *sqlEventFilter) getRules(schema, table string) []*sqlEventRule {
}

// skipDDLEvent skips ddl event by its type and query.
<<<<<<< HEAD
func (f *sqlEventFilter) shouldSkipDDL(ddl *model.DDLEvent) (bool, error) {
schema := ddl.TableInfo.TableName.Schema
table := ddl.TableInfo.TableName.Table
Expand All @@ -166,14 +165,7 @@ func (f *sqlEventFilter) shouldSkipDDL(ddl *model.DDLEvent) (bool, error) {
f.pLock.Unlock()
if err != nil {
return false, err
=======
func (f *sqlEventFilter) shouldSkipDDL(ddl *model.DDLEvent) (skip bool, err error) {
if len(f.rules) == 0 {
return false, nil
}
evenType := ddlToEventType(ddl.Type)
schema := ddl.TableInfo.TableName.Schema
table := ddl.TableInfo.TableName.Table
if evenType == bf.RenameTable {
if ddl.PreTableInfo == nil {
log.Warn("sql event filter doesn't find old table info when the event type is `rename table`",
Expand All @@ -185,7 +177,6 @@ func (f *sqlEventFilter) shouldSkipDDL(ddl *model.DDLEvent) (skip bool, err erro
}
schema = ddl.PreTableInfo.TableName.Schema
table = ddl.PreTableInfo.TableName.Table
>>>>>>> 1e1f271387 (filter(ticdc): fix incorrect event filter with "rename" DDLs (#11956))
}
if evenType == bf.NullEvent {
log.Warn("sql event filter unsupported ddl type, do nothing",
Expand Down
Loading

0 comments on commit c258dfc

Please sign in to comment.