Skip to content

Commit

Permalink
session: add transaction id in general log. (pingcap#5803)
Browse files Browse the repository at this point in the history
  • Loading branch information
coocood authored and zimulala committed Feb 6, 2018
1 parent 26d4887 commit 69be660
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1575,6 +1575,6 @@ func logStmt(node ast.StmtNode, vars *variable.SessionVars) {

func logQuery(query string, vars *variable.SessionVars) {
if atomic.LoadUint32(&variable.ProcessGeneralLog) != 0 && !vars.InRestrictedSQL {
log.Infof("[%d] %s", vars.ConnectionID, query)
log.Infof("[con:%d][txn:%d] %s", vars.ConnectionID, vars.TxnCtx.StartTS, query)
}
}

0 comments on commit 69be660

Please sign in to comment.