Skip to content

Commit

Permalink
session: fix out of memory in the batch operations (pingcap#7086)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackysp committed Jul 18, 2018
1 parent 8438bad commit 07f8b21
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,13 @@ func (s *session) NewTxn() error {
}
txn.SetCap(s.getMembufCap())
s.txn.changeInvalidToValid(txn)
s.sessionVars.TxnCtx.StartTS = txn.StartTS()
is := domain.GetDomain(s).InfoSchema()
s.sessionVars.TxnCtx = &variable.TransactionContext{
InfoSchema: is,
SchemaVersion: is.SchemaMetaVersion(),
CreateTime: time.Now(),
StartTS: txn.StartTS(),
}
return nil
}

Expand Down

0 comments on commit 07f8b21

Please sign in to comment.