code: func getTiDBVar(s Session, name string) (sVal string, isNull bool, e error) {
  	sql := fmt.Sprintf(`SELECT HIGH_PRIORITY VARIABLE_VALUE FROM %s.%s WHERE VARIABLE_NAME="%s"`,
  		mysql.SystemDB, mysql.TiDBTable, name)
  	ctx := context.Background()
  	rs, err := s.Execute(ctx, sql)
  	if err != nil {
  		return "", true, errors.Trace(err)
  	}
  	if len(rs) != 1 {
  		return "", true, errors.New("Wrong number of Recordset")
  	}
  	r := rs[0]
  	defer terror.Call(r.Close)
  	req := r.NewRecordBatch()
  	err = r.Next(ctx, req)
  	if err != nil || req.NumRows() == 0 {
  		return "", true, errors.Trace(err)
  	}
  	row := req.GetRow(0)
  	if row.IsNull(0) {
  		return "", true, nil
  	}
  	return row.GetString(0), false, nil
  }
docs: // getTiDBVar gets variable value from mysql.tidb table.
  // Those variables are used by TiDB server.