public InsertRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, WriteRowsEventData data) { super(tableInfo, INSERT_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows()); this.data = data; } }
BitSet includedColumns = write.getIncludedColumns(); RecordsForTable recordMaker = recordMakers.forTable(tableNumber, includedColumns, super::enqueueRecord); if (recordMaker != null) {
case EXT_WRITE_ROWS: for ( Serializable[] data : writeRowsData().getRows() ) { list.add(buildRowMap("insert", position, nextPosition, data, table, writeRowsData().getIncludedColumns(), rowQuery));
@Override public WriteRowsEventData deserialize(ByteArrayInputStream inputStream) throws IOException { WriteRowsEventData eventData = new WriteRowsEventData(); eventData.setTableId(inputStream.readLong(6)); inputStream.skip(2); // reserved if (mayContainExtraInformation) { int extraInfoLength = inputStream.readInteger(2); inputStream.skip(extraInfoLength - 2); } int numberOfColumns = inputStream.readPackedInteger(); eventData.setIncludedColumns(inputStream.readBitSet(numberOfColumns, true)); eventData.setRows(deserializeRows(eventData.getTableId(), eventData.getIncludedColumns(), inputStream)); return eventData; }
public InsertRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, WriteRowsEventData data) { super(tableInfo, INSERT_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows()); this.data = data; } }
@Override public WriteRowsEventData deserialize(ByteArrayInputStream inputStream) throws IOException { WriteRowsEventData eventData = new WriteRowsEventData(); eventData.setTableId(inputStream.readLong(6)); inputStream.skip(2); // reserved if (mayContainExtraInformation) { int extraInfoLength = inputStream.readInteger(2); inputStream.skip(extraInfoLength - 2); } int numberOfColumns = inputStream.readPackedInteger(); eventData.setIncludedColumns(inputStream.readBitSet(numberOfColumns, true)); eventData.setRows(deserializeRows(eventData.getTableId(), eventData.getIncludedColumns(), inputStream)); return eventData; }