code: func DecodeDecimal(b []byte) ([]byte, types.Datum, error) {
  	var d types.Datum
  	if len(b) < 3 {
  		return b, d, errors.New("insufficient bytes to decode value")
  	}
  	precision := int(b[0])
  	frac := int(b[1])
  	b = b[2:]
  	dec := new(types.MyDecimal)
  	binSize, err := dec.FromBin(b, precision, frac)
  	b = b[binSize:]
  	if err != nil {
  		return b, d, errors.Trace(err)
  	}
  	d.SetLength(precision)
  	d.SetFrac(frac)
  	d.SetMysqlDecimal(dec)
  	return b, d, nil
  }
docs: // DecodeDecimal decodes bytes to decimal.