Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: you06 <you1474600@gmail.com>
  • Loading branch information
you06 committed Dec 21, 2022
1 parent 2b02734 commit bd43a83
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -4144,13 +4144,12 @@ func (s *session) setRequestSource(ctx context.Context, stmtLabel string, stmtNo
s.sessionVars.RequestSourceType = stmtLabel
}
return
} else {
if source := ctx.Value(kv.RequestSourceKey); source != nil {
requestSource := source.(kv.RequestSource)
if requestSource.RequestSourceType != "" {
s.sessionVars.RequestSourceType = requestSource.RequestSourceType
return
}
}
if source := ctx.Value(kv.RequestSourceKey); source != nil {
requestSource := source.(kv.RequestSource)
if requestSource.RequestSourceType != "" {
s.sessionVars.RequestSourceType = requestSource.RequestSourceType
return
}
}
// panic in test mode in case there are requests without source in the future.
Expand Down

0 comments on commit bd43a83

Please sign in to comment.