code: func newFieldType(tp *types.FieldType) *types.FieldType {
  	switch tp.Tp {
  	// To avoid overflow error.
  	case mysql.TypeTiny, mysql.TypeShort, mysql.TypeInt24, mysql.TypeLong, mysql.TypeLonglong:
  		newTp := types.NewFieldType(mysql.TypeLonglong)
  		newTp.Flag = tp.Flag
  		newTp.Charset = tp.Charset
  		return newTp
  	// To avoid data truncate error.
  	case mysql.TypeFloat, mysql.TypeDouble, mysql.TypeBlob, mysql.TypeTinyBlob, mysql.TypeMediumBlob, mysql.TypeLongBlob,
  		mysql.TypeString, mysql.TypeVarchar, mysql.TypeVarString:
  		newTp := types.NewFieldType(tp.Tp)
  		newTp.Charset = tp.Charset
  		return newTp
  	default:
  		return tp
  	}
  }
docs: // We cannot use the FieldType of column directly. e.g. the column a is int32 and we have a > 1111111111111111111.
  // Obviously the constant is bigger than MaxInt32, so we will get overflow error if we use the FieldType of column a.