code: func SetSessionSystemVar(vars *SessionVars, name string, value types.Datum) error {
  	name = strings.ToLower(name)
  	sysVar := SysVars[name]
  	if sysVar == nil {
  		return UnknownSystemVar
  	}
  	sVal := ""
  	var err error
  	if !value.IsNull() {
  		sVal, err = value.ToString()
  	}
  	if err != nil {
  		return err
  	}
  	sVal, err = ValidateSetSystemVar(vars, name, sVal)
  	if err != nil {
  		return err
  	}
  	return vars.SetSystemVar(name, sVal)
  }
docs: // SetSessionSystemVar sets system variable and updates SessionVars states.