Skip to content

Commit 8bfebda

Browse files
committed
updated selector func comment
1 parent 06090bc commit 8bfebda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/analyzer/triggers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ func applyTrigger(ctx *sql.Context, a *Analyzer, originalNode, n sql.Node, scope
366366

367367
canApplyTriggerExecutor := func(c transform.Context) bool {
368368
// Don't double-apply trigger executors to the bodies of triggers. To avoid this, don't apply the trigger if the
369-
// parent is a trigger body.
369+
// parent is a trigger body. Having this as a selector function will also prevent walking the child nodes in the
370+
// trigger execution logic.
370371
if _, ok := c.Parent.(*plan.TriggerExecutor); ok {
371372
if c.ChildNum == 1 { // Right child is the trigger execution logic
372373
return false

0 commit comments

Comments
 (0)