Skip to content

Commit a193cab

Browse files
authored
ignore handling optional field meta (go-mysql-org#344)
1 parent 099239c commit a193cab

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

replication/row_event.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,14 @@ func (e *TableMapEvent) Decode(data []byte) error {
8181

8282
pos += n
8383

84-
if len(data[pos:]) != bitmapByteSize(int(e.ColumnCount)) {
84+
nullBitmapSize := bitmapByteSize(int(e.ColumnCount))
85+
if len(data[pos:]) < nullBitmapSize {
8586
return io.EOF
8687
}
8788

88-
e.NullBitmap = data[pos:]
89+
e.NullBitmap = data[pos : pos+nullBitmapSize]
90+
91+
// TODO: handle optional field meta
8992

9093
return nil
9194
}

0 commit comments

Comments
 (0)