This commit is contained in:
winger
2018-07-26 12:33:10 +08:00
parent ccd1e52411
commit e608e1d601

View File

@@ -44,13 +44,14 @@ public class GtidLogEvent extends LogEvent {
gno = buffer.getLong64(); gno = buffer.getLong64();
// support gtid lastCommitted and sequenceNumber // support gtid lastCommitted and sequenceNumber
// 42 = 1+16+8+1+8+8 // fix bug #776
if (buffer.capacity() > 42 && buffer.getUint8() == LOGICAL_TIMESTAMP_TYPE_CODE) { if (buffer.hasRemaining() && buffer.remaining() > 16 && buffer.getUint8() == LOGICAL_TIMESTAMP_TYPE_CODE) {
lastCommitted = buffer.getLong64(); lastCommitted = buffer.getLong64();
sequenceNumber = buffer.getLong64(); sequenceNumber = buffer.getLong64();
} }
// ignore gtid info read // ignore gtid info read
// sid.copy_from((uchar *)ptr_buffer); // sid.copy_from((uchar *)ptr_buffer);
// ptr_buffer+= ENCODED_SID_LENGTH; // ptr_buffer+= ENCODED_SID_LENGTH;