Skip to content

Commit 9014b19

Browse files
committed
clean up
1 parent 2f79d20 commit 9014b19

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

sql/analyzer/triggers.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ func applyTrigger(ctx *sql.Context, a *Analyzer, originalNode, n sql.Node, scope
410410
node, err := n.WithChildren(triggerExecutor)
411411
return node, transform.NewTree, err
412412
} else {
413-
// TODO: add HasAfterTrigger flag for Update node
414413
return plan.NewTriggerExecutor(n, triggerLogic, plan.UpdateTrigger, plan.TriggerTime(trigger.TriggerTime), sql.TriggerDefinition{
415414
Name: trigger.TriggerName,
416415
CreateStatement: trigger.CreateTriggerString,
@@ -440,7 +439,7 @@ func applyTrigger(ctx *sql.Context, a *Analyzer, originalNode, n sql.Node, scope
440439
node, err := n.WithChildren(triggerExecutor)
441440
return node, transform.NewTree, err
442441
} else {
443-
// TODO: add HasAfterTrigger flag for DeleteFrom node
442+
// TODO: add HasAfterTrigger flag for DeleteFrom node once DELETE...RETURNING has been implemented
444443
return plan.NewTriggerExecutor(n, triggerLogic, plan.DeleteTrigger, plan.TriggerTime(trigger.TriggerTime), sql.TriggerDefinition{
445444
Name: trigger.TriggerName,
446445
CreateStatement: trigger.CreateTriggerString,

sql/rowexec/dml_iters.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ func (t *triggerIter) Next(ctx *sql.Context) (row sql.Row, returnErr error) {
299299

300300
func (t *triggerIter) getReturningRow(ctx *sql.Context, row sql.Row) (sql.Row, error, bool) {
301301
if tableEditor, isTableEditor := t.child.(*plan.TableEditorIter); isTableEditor {
302+
// TODO: get returning rows for REPLACE and DELETE once REPLACE...RETURNING and DELETE...RETURNING have been
303+
// implemented
302304
if insert, isInsert := tableEditor.InnerIter().(*insertIter); isInsert {
303305
if len(insert.returnExprs) > 0 {
304306
retRow, err := insert.getReturningRow(ctx, row)

sql/rowexec/insert.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,6 @@ func (i *insertIter) updateLastInsertId(ctx *sql.Context, row sql.Row) {
364364
func (i *insertIter) getAutoIncVal(row sql.Row) int64 {
365365
for i, expr := range i.insertExprs {
366366
if _, ok := expr.(*expression.AutoIncrement); ok {
367-
if len(row) == 1 && i == 1 {
368-
fmt.Println("here")
369-
}
370367
return toInt64(row[i])
371368
}
372369
}

0 commit comments

Comments
 (0)