Skip to content

Commit

Permalink
Changed decode41
Browse files Browse the repository at this point in the history
  • Loading branch information
svats0001 committed Oct 2, 2024
1 parent 088f8f6 commit 567dc8d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ private static DefinitionMetadataMessage decode41(ByteBuf buf, ConnectionContext

CharCollation collation = context.getClientCollation();
Charset charset = collation.getCharset();
System.out.println("Buffer val: " + buf);
String database = readVarIntSizedString(buf, charset);
String table = readVarIntSizedString(buf, charset);
String originTable = readVarIntSizedString(buf, charset);
Expand All @@ -184,8 +183,13 @@ private static DefinitionMetadataMessage decode41(ByteBuf buf, ConnectionContext

String extendTypeInfo = null;
if (context.getCapability().isMariaDb() && context.getCapability().isExtendedTypeInfo()) {
buf.readUnsignedByte();
extendTypeInfo = readVarIntSizedString(buf, charset);
buf.markReaderIndex();
short extendedTypeInfoDataType = buf.readUnsignedByte();
if (extendedTypeInfoDataType == 0 || extendedTypeInfoDataType == 1) {
extendTypeInfo = readVarIntSizedString(buf, charset);
} else {
buf.resetReaderIndex();
}
}

// Skip constant 0x0c encoded by var integer
Expand Down

0 comments on commit 567dc8d

Please sign in to comment.