Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions replication/row_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -1068,12 +1068,8 @@ func (e *RowsEvent) decodeValue(data []byte, tp byte, meta uint16) (v interface{
})
}
case MYSQL_TYPE_TIMESTAMP2:
if meta == 0 {
v = nil
} else {
v, n, err = decodeTimestamp2(data, meta, e.timestampStringLocation)
v = e.parseFracTime(v)
}
v, n, err = decodeTimestamp2(data, meta, e.timestampStringLocation)
v = e.parseFracTime(v)
case MYSQL_TYPE_DATETIME:
n = 8
i64 := binary.LittleEndian.Uint64(data)
Expand Down Expand Up @@ -1399,7 +1395,7 @@ func decodeTimestamp2(data []byte, dec uint16, timestampStringLocation *time.Loc
}

if sec == 0 {
return formatZeroTime(int(usec), int(dec)), n, nil
return nil, n, nil
}

return fracTime{
Expand Down