Skip to content

Commit

Permalink
add args info for retry (#8506)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackysp authored Nov 29, 2018
1 parent d86ccbc commit 7ccb0f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ func (s *session) retry(ctx context.Context, maxCnt uint) error {
nh := GetHistory(s)
var err error
var schemaVersion int64
orgStartTS := s.GetSessionVars().TxnCtx.StartTS
sessVars := s.GetSessionVars()
orgStartTS := sessVars.TxnCtx.StartTS
label := s.getSQLLabel()
for {
s.PrepareTxnCtx(ctx)
Expand All @@ -493,7 +494,8 @@ func (s *session) retry(ctx context.Context, maxCnt uint) error {
if retryCnt == 0 {
// We do not have to log the query every time.
// We print the queries at the first try only.
log.Warnf("con:%d schema_ver:%d retry_cnt:%d query_num:%d sql:%s", connID, schemaVersion, retryCnt, i, sqlForLog(st.OriginText()))
log.Warnf("con:%d schema_ver:%d retry_cnt:%d query_num:%d sql:%s%s", connID, schemaVersion, retryCnt,
i, sqlForLog(st.OriginText()), sessVars.GetExecuteArgumentsInfo())
} else {
log.Warnf("con:%d schema_ver:%d retry_cnt:%d query_num:%d", connID, schemaVersion, retryCnt, i)
}
Expand Down

0 comments on commit 7ccb0f1

Please sign in to comment.