Merge pull request #780 from wingerx/master

fix bug #776
This commit is contained in:
agapple
2018-07-26 15:13:25 +08:00
committed by GitHub
@@ -44,13 +44,14 @@ public class GtidLogEvent extends LogEvent {
gno = buffer.getLong64();
// support gtid lastCommitted and sequenceNumber
// 42 = 1+16+8+1+8+8
if (buffer.capacity() > 42 && buffer.getUint8() == LOGICAL_TIMESTAMP_TYPE_CODE) {
// fix bug #776
if (buffer.hasRemaining() && buffer.remaining() > 16 && buffer.getUint8() == LOGICAL_TIMESTAMP_TYPE_CODE) {
lastCommitted = buffer.getLong64();
sequenceNumber = buffer.getLong64();
}
// ignore gtid info read
// sid.copy_from((uchar *)ptr_buffer);
// ptr_buffer+= ENCODED_SID_LENGTH;