Skip to content

Commit 8961ce0

Browse files
committed
add returning clause case for assign exec index rule
1 parent 5d82109 commit 8961ce0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/analyzer/fix_exec_indexes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func assignExecIndexes(ctx *sql.Context, a *Analyzer, n sql.Node, scope *plan.Sc
3838
}
3939
switch n := n.(type) {
4040
case *plan.InsertInto:
41-
if n.LiteralValueSource && len(n.Checks()) == 0 && len(n.OnDupExprs) == 0 {
41+
if n.LiteralValueSource && len(n.Checks()) == 0 && len(n.OnDupExprs) == 0 && len(n.Returning) == 0 {
4242
return n, transform.SameTree, nil
4343
}
4444
case *plan.Update:

0 commit comments

Comments
 (0)