@Override
    public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload) {
        int type = columnDef.getColumnMeta() >> 8;
        int length = columnDef.getColumnMeta() & 0xff;
        // unpack type & length, see https://bugs.mysql.com/bug.php?id=37426.
        if (0x30 != (type & 0x30)) {
            length += ((type & 0x30) ^ 0x30) << 4;
            type |= 0x30;
        }
        switch (MySQLBinaryColumnType.valueOf(type)) {
            case ENUM:
                return readEnumValue(length, payload);
            case SET:
                return payload.getByteBuf().readByte();
            case STRING:
                return new MySQLBinaryString(payload.readStringFixByBytes(readActualLength(length, payload)));
            default:
                throw new UnsupportedSQLOperationException(MySQLBinaryColumnType.valueOf(type).toString());
        }
    }
@Test
    void assertReadEnumValueWithMetaFailure() {
        columnDef.setColumnMeta((MySQLBinaryColumnType.ENUM.getValue() << 8) + 3);
        assertThrows(UnsupportedSQLOperationException.class, () -> new MySQLStringBinlogProtocolValue().read(columnDef, payload));
    }