Skip to content

Commit 72aa2a0

Browse files
svats0001jchrys
authored andcommitted
Changed decode41 and reset ci-mariadb-integration
1 parent 9aaa2b7 commit 72aa2a0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/ci-mariadb-intergration-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-20.04
1010
strategy:
1111
matrix:
12-
mariadb-version: [ 11.5.2 ]
12+
mariadb-version: [ 10.0, 10.1, 10.2.15, 10.2, 10.3.7, 10.3, 10.5.1, 10.5, 10.6, 10.11 ]
1313
name: Integration test with MariaDB ${{ matrix.mariadb-version }}
1414
steps:
1515
- uses: actions/checkout@v3

r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/message/server/DefinitionMetadataMessage.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,13 @@ private static DefinitionMetadataMessage decode41(ByteBuf buf, ConnectionContext
183183

184184
String extendTypeInfo = null;
185185
if (context.getCapability().isMariaDb() && context.getCapability().isExtendedTypeInfo()) {
186-
buf.readUnsignedByte();
187-
extendTypeInfo = readVarIntSizedString(buf, charset);
186+
buf.markReaderIndex();
187+
short extendedTypeInfoDataType = buf.readUnsignedByte();
188+
if (extendedTypeInfoDataType == 0 || extendedTypeInfoDataType == 1) {
189+
extendTypeInfo = readVarIntSizedString(buf, charset);
190+
} else {
191+
buf.resetReaderIndex();
192+
}
188193
}
189194

190195
// Skip constant 0x0c encoded by var integer

0 commit comments

Comments
 (0)