From 12b6ed50d5a762dcfbda304a37a2f4310c27381c Mon Sep 17 00:00:00 2001 From: july2993 Date: Tue, 12 May 2020 13:42:35 +0800 Subject: [PATCH] Fix unknown type for mediumint (#962) --- drainer/translator/kafka.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drainer/translator/kafka.go b/drainer/translator/kafka.go index 3127b43bb..ec083ed04 100644 --- a/drainer/translator/kafka.go +++ b/drainer/translator/kafka.go @@ -229,7 +229,8 @@ func DatumToColumn(colInfo *model.ColumnInfo, datum types.Datum) (col *obinlog.C col.StringValue = proto.String(str) // numeric type - case "int", "bigint", "smallint", "tinyint": + // https://dev.mysql.com/doc/refman/8.0/en/integer-types.html + case "int", "bigint", "smallint", "tinyint", "mediumint": str := fmt.Sprintf("%v", datum.GetValue()) if mysql.HasUnsignedFlag(colInfo.Flag) { val, err := strconv.ParseUint(str, 10, 64)