Skip to content

Commit 2af1d30

Browse files
committed
Update SideBySide tests to MySql.Data 8.0.29.
1 parent bcf4c06 commit 2af1d30

File tree

9 files changed

+18
-22
lines changed

9 files changed

+18
-22
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ The following bugs in Connector/NET are fixed by switching to MySqlConnector. (~
207207
* [#75917](https://bugs.mysql.com/bug.php?id=75917), [#76597](https://bugs.mysql.com/bug.php?id=76597), [#77691](https://bugs.mysql.com/bug.php?id=77691), [#78650](https://bugs.mysql.com/bug.php?id=78650), [#78919](https://bugs.mysql.com/bug.php?id=78919), [#80921](https://bugs.mysql.com/bug.php?id=80921), [#82136](https://bugs.mysql.com/bug.php?id=82136): “Reading from the stream has failed” when connecting to a server
208208
* [#77421](https://bugs.mysql.com/bug.php?id=77421): Connection is not reset when pulled from the connection pool
209209
* [#78426](https://bugs.mysql.com/bug.php?id=78426): Unknown database exception has wrong number
210-
* [#78760](https://bugs.mysql.com/bug.php?id=78760): Error when using tabs and newlines in SQL statements
210+
* ~~[#78760](https://bugs.mysql.com/bug.php?id=78760): Error when using tabs and newlines in SQL statements~~
211211
* ~~[#78917](https://bugs.mysql.com/bug.php?id=78917), [#79196](https://bugs.mysql.com/bug.php?id=79196), [#82292](https://bugs.mysql.com/bug.php?id=82292), [#89040](https://bugs.mysql.com/bug.php?id=89040): `TINYINT(1)` values start being returned as `sbyte` after `NULL`~~
212212
* ~~[#80030](https://bugs.mysql.com/bug.php?id=80030): Slow to connect with pooling disabled~~
213213
* ~~[#81650](https://bugs.mysql.com/bug.php?id=81650), [#88962](https://bugs.mysql.com/bug.php?id=88962): `Server` connection string option may now contain multiple, comma separated hosts that will be tried in order until a connection succeeds~~
@@ -292,10 +292,10 @@ The following bugs in Connector/NET are fixed by switching to MySqlConnector. (~
292292
* [#104913](https://bugs.mysql.com/bug.php?id=104913): Cannot execute stored procedure with backtick in name
293293
* ~~[#105209](https://bugs.mysql.com/bug.php?id=105209): Timespan value of zero can't be read with prepared command~~
294294
* [#105728](https://bugs.mysql.com/bug.php?id=105728): Named command parameters override query attribute values
295-
* [#105730](https://bugs.mysql.com/bug.php?id=105730): `MySqlCommand.Clone` doesn't clone attributes
296-
* [#105768](https://bugs.mysql.com/bug.php?id=105768): `MySqlCommandBuilder` doesn't support tables with `BIGINT UNSIGNED` primary key
295+
* ~~[#105730](https://bugs.mysql.com/bug.php?id=105730): `MySqlCommand.Clone` doesn't clone attributes~~
296+
* ~~[#105768](https://bugs.mysql.com/bug.php?id=105768): `MySqlCommandBuilder` doesn't support tables with `BIGINT UNSIGNED` primary key~~
297297
* [#105965](https://bugs.mysql.com/bug.php?id=105965): `MySqlParameterCollection.Add(object)` has quadratic performance
298-
* [#106242](https://bugs.mysql.com/bug.php?id=106242): `MySqlConnection.Open` throws `AggregateException` instead of `MySqlException`
298+
* ~~[#106242](https://bugs.mysql.com/bug.php?id=106242): `MySqlConnection.Open` throws `AggregateException` instead of `MySqlException`~~
299299
* [#106243](https://bugs.mysql.com/bug.php?id=106243): `CancellationToken` doesn't cancel `MySqlConnection.OpenAsync`
300-
* [#106244](https://bugs.mysql.com/bug.php?id=106244): `MySqlDataReader.GetFieldValue<Stream>` throws `InvalidCastException`
300+
* ~~[#106244](https://bugs.mysql.com/bug.php?id=106244): `MySqlDataReader.GetFieldValue<Stream>` throws `InvalidCastException`~~
301301
* [#106247](https://bugs.mysql.com/bug.php?id=106247): Can't use `MySqlDbType.Enum` or `MySqlDbType.Set` with prepared command

tests/SideBySide/CommandTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,13 @@ public void CloneCommand()
279279
param.Value = 0m;
280280
Assert.NotEqual(0m, cmd2.Parameters[0].Value);
281281

282-
#if !BASELINE // https://bugs.mysql.com/bug.php?id=105730
283282
Assert.Equal(1, cmd2.Attributes.Count);
284283
var attr2 = cmd2.Attributes[0];
285284
Assert.Equal(attr.AttributeName, attr2.AttributeName);
286285
Assert.Equal(attr.Value, attr2.Value);
287286

288287
attr.Value = 0;
289288
Assert.NotEqual(0, cmd2.Attributes[0].Value);
290-
#endif
291289
}
292290

293291
[Fact]

tests/SideBySide/ConnectAsync.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public ConnectAsync(DatabaseFixture database)
1212
m_database = database;
1313
}
1414

15-
[SkippableFact(Baseline = "https://bugs.mysql.com/bug.php?id=106242")]
15+
[Fact]
1616
public async Task ConnectBadHost()
1717
{
1818
var csb = new MySqlConnectionStringBuilder
@@ -27,7 +27,7 @@ public async Task ConnectBadHost()
2727
Assert.Equal(ConnectionState.Closed, connection.State);
2828
}
2929

30-
[SkippableFact(Baseline = "https://bugs.mysql.com/bug.php?id=106242")]
30+
[Fact]
3131
public async Task ConnectBadPort()
3232
{
3333
var csb = new MySqlConnectionStringBuilder
@@ -399,7 +399,7 @@ public async Task Sha256WithSecureConnection()
399399
public async Task Sha256WithoutSecureConnection()
400400
{
401401
var csb = AppConfig.CreateSha256ConnectionStringBuilder();
402-
csb.SslMode = MySqlSslMode.None;
402+
csb.SslMode = MySqlSslMode.Disabled;
403403
csb.AllowPublicKeyRetrieval = true;
404404
using var connection = new MySqlConnection(csb.ConnectionString);
405405
if (AppConfig.SupportedFeatures.HasFlag(ServerFeatures.RsaEncryption))
@@ -420,7 +420,7 @@ public async Task CachingSha2WithSecureConnection()
420420
public async Task CachingSha2WithoutSecureConnection()
421421
{
422422
var csb = AppConfig.CreateCachingSha2ConnectionStringBuilder();
423-
csb.SslMode = MySqlSslMode.None;
423+
csb.SslMode = MySqlSslMode.Disabled;
424424
csb.AllowPublicKeyRetrieval = true;
425425
using var connection = new MySqlConnection(csb.ConnectionString);
426426
await connection.OpenAsync();

tests/SideBySide/ConnectSync.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public ConnectSync(DatabaseFixture database)
99
m_database = database;
1010
}
1111

12-
[SkippableFact(Baseline = "https://bugs.mysql.com/bug.php?id=106242")]
12+
[Fact]
1313
public void ConnectBadHost()
1414
{
1515
var csb = new MySqlConnectionStringBuilder
@@ -27,7 +27,7 @@ public void ConnectBadHost()
2727
Assert.Equal(ConnectionState.Closed, connection.State);
2828
}
2929

30-
[SkippableFact(Baseline = "https://bugs.mysql.com/bug.php?id=106242")]
30+
[Fact]
3131
public void ConnectBadPort()
3232
{
3333
var csb = new MySqlConnectionStringBuilder
@@ -547,7 +547,7 @@ public void Sha256WithSecureConnection()
547547
public void Sha256WithoutSecureConnection()
548548
{
549549
var csb = AppConfig.CreateSha256ConnectionStringBuilder();
550-
csb.SslMode = MySqlSslMode.None;
550+
csb.SslMode = MySqlSslMode.Disabled;
551551
csb.AllowPublicKeyRetrieval = true;
552552
using var connection = new MySqlConnection(csb.ConnectionString);
553553
#if NET45

tests/SideBySide/DataTypes.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,7 @@ public void QueryBlob(string column, int padLength)
815815

816816
DoQuery<GetBytesWhenNullException>("blobs", "`" + column + "`", "BLOB", new object[] { null, data }, GetBytes);
817817
DoQuery<GetStreamWhenNullException>("blobs", "`" + column + "`", "BLOB", new object[] { null, data }, GetStreamBytes);
818-
#if !BASELINE // https://bugs.mysql.com/bug.php?id=106244
819-
DoQuery("blobs", "`" + column + "`", "BLOB", new object[] { null, data }, reader => reader.GetStream(0), matchesDefaultType: false, assertEqual: (e, a) =>
818+
DoQuery<GetStreamWhenNullException>("blobs", "`" + column + "`", "BLOB", new object[] { null, data }, reader => reader.GetStream(0), matchesDefaultType: false, assertEqual: (e, a) =>
820819
{
821820
using var stream = (Stream) a;
822821
Assert.True(stream.CanRead);
@@ -825,7 +824,6 @@ public void QueryBlob(string column, int padLength)
825824
Assert.Equal(bytes.Length, stream.Read(bytes, 0, bytes.Length));
826825
Assert.Equal(e, bytes);
827826
}, getFieldValueType: typeof(Stream));
828-
#endif
829827
}
830828

831829
[Theory]

tests/SideBySide/QueryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ public void DapperNullableBoolNullFirst()
534534
Assert.Null(rows[2].IsBold);
535535
}
536536

537-
[SkippableFact(Baseline = "https://bugs.mysql.com/bug.php?id=78760")]
537+
[Fact]
538538
public void TabsAndNewLines()
539539
{
540540
m_database.Connection.Execute(@"drop table if exists query_tabs;

tests/SideBySide/SideBySide.csproj

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

5454
<ItemGroup Condition=" '$(Configuration)' == 'Baseline' ">
55-
<PackageReference Include="MySql.Data" Version="8.0.28" />
55+
<PackageReference Include="MySql.Data" Version="8.0.29" />
5656
<Using Include="MySql.Data.MySqlClient" />
5757
</ItemGroup>
5858

tests/SideBySide/TestUtilities.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ public static string GetSkipReason(ServerFeatures serverFeatures, ConfigSettings
5757
return null;
5858

5959
var csb = AppConfig.CreateConnectionStringBuilder();
60-
if (configSettings.HasFlag(ConfigSettings.RequiresSsl) && (csb.SslMode == MySqlSslMode.None
60+
if (configSettings.HasFlag(ConfigSettings.RequiresSsl) && (csb.SslMode == MySqlSslMode.Disabled
6161
#if !BASELINE
6262
|| csb.SslMode == MySqlSslMode.Preferred
6363
#endif
6464
))
6565
return "Requires SslMode=Required or higher in connection string";
6666

6767
if (configSettings.HasFlag(ConfigSettings.TrustedHost) &&
68-
(csb.SslMode == MySqlSslMode.None ||
68+
(csb.SslMode == MySqlSslMode.Disabled ||
6969
#if !BASELINE
7070
csb.SslMode == MySqlSslMode.Preferred ||
7171
#endif

tests/SideBySide/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.28.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.29.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
77
</DbProviderFactories>
88
</system.data>
99
</configuration>

0 commit comments

Comments
 (0)