Skip to content

Commit 609e243

Browse files
author
Stanley Shyiko
committed
shyiko#258 follow up
1 parent 48d210c commit 609e243

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/com/github/shyiko/mysql/binlog/event/FormatDescriptionEventData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class FormatDescriptionEventData implements EventData {
2626
private String serverVersion;
2727
private int headerLength;
2828
private int dataLength;
29-
private ChecksumType checksumType = ChecksumType.NONE;
29+
private ChecksumType checksumType;
3030

3131
public int getBinlogVersion() {
3232
return binlogVersion;

src/main/java/com/github/shyiko/mysql/binlog/event/deserialization/FormatDescriptionEventDataDeserializer.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ public FormatDescriptionEventData deserialize(ByteArrayInputStream inputStream)
3838
inputStream.skip(EventType.FORMAT_DESCRIPTION.ordinal() - 1);
3939
eventData.setDataLength(inputStream.readInteger(1));
4040
int checksumBlockLength = eventBodyLength - eventData.getDataLength();
41+
ChecksumType checksumType = ChecksumType.NONE;
4142
if (checksumBlockLength > 0) {
4243
inputStream.skip(inputStream.available() - checksumBlockLength);
43-
eventData.setChecksumType(ChecksumType.byOrdinal(inputStream.read()));
44+
checksumType = ChecksumType.byOrdinal(inputStream.read());
4445
}
46+
eventData.setChecksumType(checksumType);
4547
return eventData;
4648
}
4749
}

0 commit comments

Comments
 (0)