code: func checkColumnAttributes(colName string, tp *types.FieldType) error {
  	switch tp.Tp {
  	case mysql.TypeNewDecimal, mysql.TypeDouble, mysql.TypeFloat:
  		if tp.Flen < tp.Decimal {
  			return types.ErrMBiggerThanD.GenWithStackByArgs(colName)
  		}
  	case mysql.TypeDatetime, mysql.TypeDuration, mysql.TypeTimestamp:
  		if tp.Decimal != types.UnspecifiedFsp && (tp.Decimal < types.MinFsp || tp.Decimal > types.MaxFsp) {
  			return types.ErrTooBigPrecision.GenWithStackByArgs(tp.Decimal, colName, types.MaxFsp)
  		}
  	}
  	return nil
  }
docs: // checkColumnAttributes check attributes for single column.