mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fix bug #776
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user