提交 8fd7b2fe 编写于 作者: A avalon566

Support v1 rows event

上级 38056c68
......@@ -60,9 +60,13 @@ public class RowsEvent {
public void parsePostHeader(final ByteBuf in) {
tableId = DataTypesCodec.readUnsignedInt6LE(in);
flags = DataTypesCodec.readUnsignedInt2LE(in);
var extraDataLength = DataTypesCodec.readUnsignedInt2LE(in) - 2;
// skip data
DataTypesCodec.readBytes(extraDataLength, in);
if (EventTypes.WRITE_ROWS_EVENTv2 <= binlogEventHeader.getTypeCode()
&& EventTypes.DELETE_ROWS_EVENTv2 >= binlogEventHeader.getTypeCode()) {
// added the extra-data fields in v2
var extraDataLength = DataTypesCodec.readUnsignedInt2LE(in) - 2;
// skip data
DataTypesCodec.readBytes(extraDataLength, in);
}
}
public void parsePaylod(final BinlogContext binlogContext, final ByteBuf in) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册