diff --git a/replication/row_event.go b/replication/row_event.go index 6427c89cc..a114b32e3 100644 --- a/replication/row_event.go +++ b/replication/row_event.go @@ -787,7 +787,12 @@ func (e *RowsEvent) decodeValue(data []byte, tp byte, meta uint16) (v interface{ case MYSQL_TYPE_YEAR: n = 1 - v = int(data[0]) + 1900 + year := int(data[0]) + if year == 0 { + v = year + } else { + v = year + 1900 + } case MYSQL_TYPE_ENUM: l := meta & 0xFF switch l {