Skip to content

Commit

Permalink
sessionctx/varsutil: fix format str in sysvar error msg (pingcap#2572)
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf authored Jan 29, 2017
1 parent df6e1b3 commit 67a9bd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sessionctx/varsutil/varsutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func GetSessionSystemVar(s *variable.SessionVars, key string) (string, error) {
key = strings.ToLower(key)
sysVar := variable.SysVars[key]
if sysVar == nil {
return "", variable.UnknownSystemVar
return "", variable.UnknownSystemVar.GenByArgs(key)
}
sVal, ok := s.Systems[key]
if ok {
Expand All @@ -53,7 +53,7 @@ func GetGlobalSystemVar(s *variable.SessionVars, key string) (string, error) {
key = strings.ToLower(key)
sysVar := variable.SysVars[key]
if sysVar == nil {
return "", variable.UnknownSystemVar
return "", variable.UnknownSystemVar.GenByArgs(key)
}
if sysVar.Scope == variable.ScopeSession {
return "", variable.ErrIncorrectScope
Expand Down

0 comments on commit 67a9bd0

Please sign in to comment.