code: func GetGlobalSystemVar(s *variable.SessionVars, key string) (string, error) {
  	key = strings.ToLower(key)
  	sysVar := variable.SysVars[key]
  	if sysVar == nil {
  		return "", variable.UnknownSystemVar
  	}
  	if sysVar.Scope == variable.ScopeSession {
  		return "", variable.ErrIncorrectScope
  	} else if sysVar.Scope == variable.ScopeNone {
  		return sysVar.Value, nil
  	}
  	return s.GlobalVarsAccessor.GetGlobalSysVar(key)
  }
docs: // GetGlobalSystemVar gets a global system variable.