Skip to content

Commit 361a41d

Browse files
committed
executor: address comments
1 parent 1162a3f commit 361a41d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

executor/ddl.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ func (e *DDLExec) Next(ctx context.Context, chk *chunk.Chunk) (err error) {
6868
}
6969
e.done = true
7070

71-
// For every DDL, we must commit current transaction.
72-
if err := e.ctx.NewTxn(); err != nil {
71+
// For each DDL, we should commit the previous transaction and create a new transaction.
72+
if err = e.ctx.NewTxn(); err != nil {
7373
return errors.Trace(err)
7474
}
7575
defer func() { e.ctx.GetSessionVars().StmtCtx.IsDDLJobInQueue = false }()

0 commit comments

Comments
 (0)