Skip to content

Commit 11937af

Browse files
committed
Run tests on MariaDB 11.6.
This adds support for the 'parsec' plugin. Signed-off-by: Bradley Grainger <[email protected]>
1 parent a64e5c4 commit 11937af

File tree

7 files changed

+22
-7
lines changed

7 files changed

+22
-7
lines changed

.ci/docker-run.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ MYSQL_EXTRA=
2626
MYSQL=mysql
2727

2828
if [[ "$IMAGE" == mariadb* ]]; then
29-
MYSQL_EXTRA='--in-predicate-conversion-threshold=100000'
29+
MYSQL_EXTRA='--in-predicate-conversion-threshold=100000 --plugin-maturity=beta'
3030
fi
31-
if [ "$IMAGE" == "mariadb:11.4" ]; then
31+
if [ "$IMAGE" == "mariadb:11.4" ] || [ "$IMAGE" == "mariadb:11.6" ]; then
3232
MYSQL='mariadb'
3333
fi
3434

azure-pipelines.yml

+4
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ jobs:
192192
image: 'mariadb:11.4'
193193
connectionStringExtra: ''
194194
unsupportedFeatures: 'CachingSha2Password,CancelSleepSuccessfully,Json,RoundDateTime,QueryAttributes,Sha256Password,Tls11,UuidToBin,Redirection'
195+
'MariaDB 11.6':
196+
image: 'mariadb:11.6'
197+
connectionStringExtra: ''
198+
unsupportedFeatures: 'CachingSha2Password,CancelSleepSuccessfully,Json,RoundDateTime,QueryAttributes,Redirection,Sha256Password,Tls11,UuidToBin'
195199
steps:
196200
- template: '.ci/integration-tests-steps.yml'
197201
parameters:

docs/content/home.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Server | Versions | Notes
6464
Amazon Aurora RDS | 2.x, 3.x | Use `Pipelining=False` [for Aurora 2.x](https://mysqlconnector.net/troubleshooting/aurora-freeze/)
6565
Azure Database for MySQL | 5.7, 8.0 | Single Server and Flexible Server
6666
Google Cloud SQL for MySQL | 5.6, 5.7, 8.0 |
67-
MariaDB | 10.x (**10.6**, **10.11**), 11.x (**11.4**) |
67+
MariaDB | 10.x (**10.6**, **10.11**), 11.x (**11.4**, **11.6**) |
6868
MySQL | 5.5, 5.6, 5.7, 8.x (**8.0**, **8.4**), 9.x (**9.2**) | 5.5 is EOL and has some [compatibility issues](https://github.com/mysql-net/MySqlConnector/issues/1192); 5.6 and 5.7 are EOL
6969
Percona Server | 5.6, 5.7, 8.0 |
7070
PlanetScale | | See PlanetScale [MySQL compatibility notes](https://planetscale.com/docs/reference/mysql-compatibility)

src/MySqlConnector/Protocol/CharacterSet.cs

+2
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,11 @@ internal enum CharacterSet : ushort
296296
Utf8Mb3CroatianCaseInsensitiveMariaDb = 576,
297297
Utf8Mb3MyanmarCaseInsensitive = 577,
298298
Utf8Mb3ThaiUnicode520Weight2 = 578,
299+
Utf8Mb3General1400AccentSensitiveCaseInsensitive = 579,
299300
Utf8Mb4CroatianCaseInsensitiveMariaDb = 608,
300301
Utf8Mb4MyanmarCaseInsensitive = 609,
301302
Utf8Mb4ThaiUnicode520Weight2 = 610,
303+
Utf8Mb4General1400AccentSensitiveCaseInsensitive = 611,
302304
Ucs2CroatianCaseInsensitiveMariaDb = 640,
303305
Ucs2MyanmarCaseInsensitive = 641,
304306
Ucs2ThaiUnicode520Weight2 = 642,

src/MySqlConnector/Protocol/Serialization/ProtocolUtility.cs

+2
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ public static int GetBytesPerCharacter(CharacterSet characterSet)
225225
case CharacterSet.Utf8Mb3CroatianCaseInsensitiveMariaDb:
226226
case CharacterSet.Utf8Mb3MyanmarCaseInsensitive:
227227
case CharacterSet.Utf8Mb3ThaiUnicode520Weight2:
228+
case CharacterSet.Utf8Mb3General1400AccentSensitiveCaseInsensitive:
228229
case CharacterSet.UjisJapaneseNoPadCaseInsensitive:
229230
case CharacterSet.Utf8Mb3GeneralNoPadCaseInsensitive:
230231
case CharacterSet.Utf8Mb3NoPadBinary:
@@ -384,6 +385,7 @@ public static int GetBytesPerCharacter(CharacterSet characterSet)
384385
case CharacterSet.Utf8Mb4CroatianCaseInsensitiveMariaDb:
385386
case CharacterSet.Utf8Mb4MyanmarCaseInsensitive:
386387
case CharacterSet.Utf8Mb4ThaiUnicode520Weight2:
388+
case CharacterSet.Utf8Mb4General1400AccentSensitiveCaseInsensitive:
387389
case CharacterSet.Utf16CroatianCaseInsensitiveMariaDb:
388390
case CharacterSet.Utf16MyanmarCaseInsensitive:
389391
case CharacterSet.Utf16ThaiUnicode520Weight2:

tests/IntegrationTests/CharacterSetTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void CollationConnection(bool reopenConnection)
7979

8080
var collation = connection.Query<string>(@"select @@collation_connection;").Single();
8181
var expected = connection.ServerVersion.Substring(0, 2) is "8." or "9." ? "utf8mb4_0900_ai_ci" :
82-
connection.ServerVersion.StartsWith("11.4.", StringComparison.Ordinal) ? "utf8mb4_uca1400_ai_ci" :
82+
connection.ServerVersion.StartsWith("11.4.", StringComparison.Ordinal) || connection.ServerVersion.StartsWith("11.6.", StringComparison.Ordinal) ? "utf8mb4_uca1400_ai_ci" :
8383
"utf8mb4_general_ci";
8484
Assert.Equal(expected, collation);
8585
}

tests/IntegrationTests/TestUtilities.cs

+10-3
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,18 @@ private static async Task AssertExecuteScalarReturnsOneOrThrowsExceptionAsync(My
7979
}
8080
else
8181
{
82-
var ex = await Assert.ThrowsAsync<MySqlException>(async () => await command.ExecuteScalarAsync(token));
82+
var ex = await Assert.ThrowsAnyAsync<Exception>(async () => await command.ExecuteScalarAsync(token));
83+
MySqlException exception = ex as MySqlException;
84+
while (exception is null && ex is not null)
85+
{
86+
ex = ex.InnerException;
87+
exception = ex as MySqlException;
88+
}
89+
Assert.NotNull(exception);
8390
#if MYSQL_DATA
84-
Assert.Equal((int) expectedCode, ex.Number);
91+
Assert.Equal((int) expectedCode, exception.Number);
8592
#else
86-
Assert.Equal(expectedCode, ex.ErrorCode);
93+
Assert.Equal(expectedCode, exception.ErrorCode);
8794
#endif
8895
}
8996
}

0 commit comments

Comments
 (0)