Skip to content

Commit 0dd5b62

Browse files
committed
Update integration tests to MySql.Data 8.0.31.
Signed-off-by: Bradley Grainger <[email protected]>
1 parent e2dc275 commit 0dd5b62

File tree

8 files changed

+9
-14
lines changed

8 files changed

+9
-14
lines changed

docs/content/tutorials/migrating-from-connector-net.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ The following bugs in Connector/NET are fixed by switching to MySqlConnector. (~
248248
* [#95348](https://bugs.mysql.com/bug.php?id=95348): Inefficient query when executing stored procedures
249249
* [#95436](https://bugs.mysql.com/bug.php?id=95436): Client doesn't authenticate with PEM certificate
250250
* ~~[#95984](https://bugs.mysql.com/bug.php?id=95984): “Incorrect arguments to mysqld_stmt_execute” using prepared statement with `MySqlDbType.JSON`~~
251-
* [#95986](https://bugs.mysql.com/bug.php?id=95986): “Incorrect integer value” using prepared statement with `MySqlDbType.Int24`
251+
* ~~[#95986](https://bugs.mysql.com/bug.php?id=95986): “Incorrect integer value” using prepared statement with `MySqlDbType.Int24`~~
252252
* ~~[#96355](https://bugs.mysql.com/bug.php?id=96355), [#96614](https://bugs.mysql.com/bug.php?id=96614): `Could not load file or assembly 'Renci.SshNet'` when opening connection~~
253253
* ~~[#96498](https://bugs.mysql.com/bug.php?id=96498): `WHERE` clause using `MySqlGeometry` as parameter finds no rows~~
254254
* ~~[#96499](https://bugs.mysql.com/bug.php?id=96499): `MySqlException` when inserting a `MySqlGeometry` value~~
@@ -277,19 +277,20 @@ The following bugs in Connector/NET are fixed by switching to MySqlConnector. (~
277277
* [#101507](https://bugs.mysql.com/bug.php?id=101507): `MySqlCommand.Cancel` throws `NullReferenceException` for a closed connection
278278
* ~~[#101714](https://bugs.mysql.com/bug.php?id=101714): Extremely slow performance reading result sets~~
279279
* ~~[#102303](https://bugs.mysql.com/bug.php?id=102303): Preparing command with incorrect parameter type puts connection in bad state~~
280-
* [#102593](https://bugs.mysql.com/bug.php?id=102593): Can't use `MemoryStream` as `MySqlParameter.Value`
280+
* ~~[#102593](https://bugs.mysql.com/bug.php?id=102593): Can't use `MemoryStream` as `MySqlParameter.Value`~~
281281
* ~~[#103390](https://bugs.mysql.com/bug.php?id=103390): Can't query `CHAR(36)` column if `MySqlCommand` is prepared~~
282282
* ~~[#103430](https://bugs.mysql.com/bug.php?id=103430): Can't connect using named pipe on Windows~~
283283
* ~~[#103801](https://bugs.mysql.com/bug.php?id=103801): `TimeSpan` parameters lose microseconds with prepared statement~~
284284
* [#103819](https://bugs.mysql.com/bug.php?id=103819): Can't use `StringBuilder` containing non-BMP characters as `MySqlParameter.Value`
285285
* ~~[#104910](https://bugs.mysql.com/bug.php?id=104910): `MySqlConnectionStringBuilder.TryGetValue` always returns `false`~~
286286
* ~~[#104913](https://bugs.mysql.com/bug.php?id=104913): Cannot execute stored procedure with backtick in name~~
287287
* ~~[#105209](https://bugs.mysql.com/bug.php?id=105209): Timespan value of zero can't be read with prepared command~~
288-
* [#105728](https://bugs.mysql.com/bug.php?id=105728): Named command parameters override query attribute values
288+
* ~~[#105728](https://bugs.mysql.com/bug.php?id=105728): Named command parameters override query attribute values~~
289289
* ~~[#105730](https://bugs.mysql.com/bug.php?id=105730): `MySqlCommand.Clone` doesn't clone attributes~~
290290
* ~~[#105768](https://bugs.mysql.com/bug.php?id=105768): `MySqlCommandBuilder` doesn't support tables with `BIGINT UNSIGNED` primary key~~
291291
* [#105965](https://bugs.mysql.com/bug.php?id=105965): `MySqlParameterCollection.Add(object)` has quadratic performance
292292
* ~~[#106242](https://bugs.mysql.com/bug.php?id=106242): `MySqlConnection.Open` throws `AggregateException` instead of `MySqlException`~~
293293
* ~~[#106243](https://bugs.mysql.com/bug.php?id=106243): `CancellationToken` doesn't cancel `MySqlConnection.OpenAsync`~~
294294
* ~~[#106244](https://bugs.mysql.com/bug.php?id=106244): `MySqlDataReader.GetFieldValue<Stream>` throws `InvalidCastException`~~
295295
* [#106247](https://bugs.mysql.com/bug.php?id=106247): Can't use ~~`MySqlDbType.Enum` or~~ `MySqlDbType.Set` with prepared command
296+
* [#108756](https://bugs.mysql.com/bug.php?id=108756): Can't insert negative number using prepared statement with MySqlDbType.Int24]

tests/IntegrationTests/DataTypes.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,6 @@ public void QueryInt32(string column, string dataTypeName, object[] expected)
270270
[InlineData("UInt32", "INT", new object[] { null, default(uint), uint.MinValue, uint.MaxValue, 123456789u })]
271271
public void QueryUInt32(string column, string dataTypeName, object[] expected)
272272
{
273-
#if MYSQL_DATA
274-
// mysql-connector-net incorrectly returns "INT" for "MEDIUMINT UNSIGNED"
275-
dataTypeName = "INT";
276-
#endif
277273
DoQuery("integers", column, dataTypeName, expected, reader => reader.GetUInt32(column));
278274
}
279275

tests/IntegrationTests/InsertTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ public void InsertMySqlDateTime()
345345
Assert.Equal(new DateTime(2018, 6, 9, 12, 34, 56, 123).AddTicks(4560), datetime);
346346
}
347347

348-
[SkippableTheory(MySqlData = "https://bugs.mysql.com/bug.php?id=102593")]
348+
[Theory]
349349
[InlineData(false)]
350350
[InlineData(true)]
351351
public void InsertMemoryStream(bool prepare)

tests/IntegrationTests/IntegrationTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
</ItemGroup>
5252

5353
<ItemGroup Condition=" '$(Configuration)' == 'MySqlData' ">
54-
<PackageReference Include="MySql.Data" Version="8.0.30" />
54+
<PackageReference Include="MySql.Data" Version="8.0.31" />
5555
<Using Include="MySql.Data.MySqlClient" />
5656
</ItemGroup>
5757

tests/IntegrationTests/PreparedCommandTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ public static IEnumerable<object[]> GetInsertAndQueryData()
376376
#if !MYSQL_DATA
377377
yield return new object[] { isPrepared, "MEDIUMINT", -1234567, MySqlDbType.Int24 };
378378
#else
379-
// https://bugs.mysql.com/bug.php?id=95986
379+
// https://bugs.mysql.com/bug.php?id=108756
380380
yield return new object[] { isPrepared, "MEDIUMINT", -1234567, MySqlDbType.Int32 };
381381
#endif
382382
yield return new object[] { isPrepared, "MEDIUMINT UNSIGNED", 1234567u, MySqlDbType.UInt24 };

tests/IntegrationTests/QueryTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,9 +1431,7 @@ public void QueryAttributeWithEmptyName()
14311431

14321432
[SkippableTheory(ServerFeatures.QueryAttributes)]
14331433
[InlineData(false)]
1434-
#if !MYSQL_DATA // https://bugs.mysql.com/bug.php?id=105728
14351434
[InlineData(true)]
1436-
#endif
14371435
public void QueryAttributeAndParameter(bool prepare)
14381436
{
14391437
using var connection = new MySqlConnection(AppConfig.ConnectionString);

tests/IntegrationTests/app.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<system.data>
44
<DbProviderFactories>
55
<add name="MySqlConnector" invariant="MySqlConnector" description="Async MySQL ADO.NET Connector" type="MySqlConnector.MySqlConnectorFactory, MySqlConnector, Culture=neutral, PublicKeyToken=d33d3e53aa5f8c92" />
6-
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.30.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
6+
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.31.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
77
</DbProviderFactories>
88
</system.data>
99
</configuration>

tests/MySqlConnector.Tests/MySqlConnector.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</ItemGroup>
3333

3434
<ItemGroup Condition=" '$(Configuration)' == 'MySqlData' ">
35-
<PackageReference Include="MySql.Data" Version="8.0.30" />
35+
<PackageReference Include="MySql.Data" Version="8.0.31" />
3636
<Compile Remove="ByteBufferWriterTests.cs;CachedProcedureTests.cs;CancellationTests.cs;ConnectionTests.cs;FakeMySqlServer.cs;FakeMySqlServerConnection.cs;LoadBalancerTests.cs;MySqlDecimalTests.cs;MySqlExceptionTests.cs;MySqlParameterCollectionNameToIndexTests.cs;NormalizeTests.cs;ServerVersionTests.cs;StatementPreparerTests.cs;TypeMapperTests.cs;UtilityTests.cs" />
3737
</ItemGroup>
3838

0 commit comments

Comments
 (0)