Skip to content

Commit

Permalink
handle referred foreign keys
Browse files Browse the repository at this point in the history
Signed-off-by: you06 <[email protected]>
  • Loading branch information
you06 committed Mar 14, 2024
1 parent 95a0bcb commit 1a9f15e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -4371,6 +4371,13 @@ func (s *session) usePipelinedDmlOrWarn() bool {
if tableInfo.Meta().TempTableType == model.TempTableLocal {
return false
}
if len(tableInfo.Meta().ForeignKeys) > 0 {
return false
}
referredFKs := is.GetTableReferredForeignKeys(s.sessionVars.CurrentDB, table.Name.O)
if len(referredFKs) > 0 {
return false
}
}
}
}
Expand Down

0 comments on commit 1a9f15e

Please sign in to comment.