Skip to content

Commit 562cd72

Browse files
committed
Update MySql.Data to 8.0.28.
1 parent 984655a commit 562cd72

File tree

11 files changed

+37
-40
lines changed

11 files changed

+37
-40
lines changed

docs/content/connection-options.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,11 @@ from your connection string when migrating from Connector/NET to MySqlConnector.
509509
<td>false</td>
510510
<td>This option is deprecated in Connector/NET and unsupported in MySqlConnector.</td>
511511
</tr>
512+
<tr id="Password1">
513+
<td>Password1, Password2, Password3</td>
514+
<td></td>
515+
<td>MySqlConnector does not currently support multifactor authentication; see [issue 1068](https://github.com/mysql-net/MySqlConnector/issues/1068).</td>
516+
</tr>
512517
<tr id="ProcedureCacheSize">
513518
<td>ProcedureCacheSize, Procedure Cache Size, ProcedureCache, Procedure Cache</td>
514519
<td></td>

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,14 @@ The following bugs in Connector/NET are fixed by switching to MySqlConnector. (~
241241
* [#92367](https://bugs.mysql.com/bug.php?id=92367): `MySqlDataReader.GetDateTime` and `GetValue` return inconsistent values
242242
* [#92465](https://bugs.mysql.com/bug.php?id=92465): “There is already an open DataReader” `MySqlException` thrown from `TransactionScope.Dispose`
243243
* [#92734](https://bugs.mysql.com/bug.php?id=92734): `MySqlParameter.Clone` doesn't copy all property values
244-
* [#92789](https://bugs.mysql.com/bug.php?id=92789): Illegal connection attributes written for non-ASCII values
244+
* ~~[#92789](https://bugs.mysql.com/bug.php?id=92789): Illegal connection attributes written for non-ASCII values~~
245245
* ~~[#92912](https://bugs.mysql.com/bug.php?id=92912): `MySqlDbType.LongText` values encoded incorrectly with prepared statements~~
246246
* ~~[#92982](https://bugs.mysql.com/bug.php?id=92982), [#93399](https://bugs.mysql.com/bug.php?id=93399)~~: `FormatException` thrown when connecting to MySQL Server 8.0.13~~
247247
* [#93047](https://bugs.mysql.com/bug.php?id=93047): `MySqlDataAdapter` throws timeout exception when an error occurs
248248
* ~~[#93202](https://bugs.mysql.com/bug.php?id=93202): Connector runs `SHOW VARIABLES` when connection is made~~
249249
* [#93220](https://bugs.mysql.com/bug.php?id=93220): Can’t call FUNCTION when parameter name contains parentheses
250250
* [#93370](https://bugs.mysql.com/bug.php?id=93370): `MySqlParameterCollection.Add` precondition check isn't consistent
251-
* [#93374](https://bugs.mysql.com/bug.php?id=93374): `MySqlDataReader.GetStream` throws `IndexOutOfRangeException`
251+
* ~~[#93374](https://bugs.mysql.com/bug.php?id=93374): `MySqlDataReader.GetStream` throws `IndexOutOfRangeException`~~
252252
* [#93825](https://bugs.mysql.com/bug.php?id=93825): `MySqlException` loses data when serialized
253253
* ~~[#94075](https://bugs.mysql.com/bug.php?id=94075): `MySqlCommand.Cancel` throws exception~~
254254
* [#94760](https://bugs.mysql.com/bug.php?id=94760): `MySqlConnection.OpenAsync(CancellationToken)` doesn’t respect cancellation token
@@ -278,20 +278,23 @@ The following bugs in Connector/NET are fixed by switching to MySqlConnector. (~
278278
* ~~[#100306](https://bugs.mysql.com/bug.php?id=100306): `Command.Prepare` sends wrong statement to server~~
279279
* ~~[#100522](https://bugs.mysql.com/bug.php?id=100522): ` MySqlCommand.Parameters.Insert(-1)` succeeds but should fail~~
280280
* ~~[#101252](https://bugs.mysql.com/bug.php?id=101252): Can't query `CHAR(36)` column containing `NULL`~~
281-
* [#101253](https://bugs.mysql.com/bug.php?id=101253): Default value for `MySqlParameter.Value` changed from null to `0`
281+
* ~~[#101253](https://bugs.mysql.com/bug.php?id=101253): Default value for `MySqlParameter.Value` changed from null to `0`~~
282282
* ~~[#101302](https://bugs.mysql.com/bug.php?id=101302): Stored Procedure `BOOL` parameter can only be mapped to `MySqlDbType.Byte`~~
283283
* [#101485](https://bugs.mysql.com/bug.php?id=101485): Stored Procedure `JSON` parameter throws “Unhandled type encountered” `MySqlException`
284284
* [#101507](https://bugs.mysql.com/bug.php?id=101507): `MySqlCommand.Cancel` throws `NullReferenceException` for a closed connection
285285
* ~~[#101714](https://bugs.mysql.com/bug.php?id=101714): Extremely slow performance reading result sets~~
286286
* [#102593](https://bugs.mysql.com/bug.php?id=102593): Can't use `MemoryStream` as `MySqlParameter.Value`
287287
* ~~[#103390](https://bugs.mysql.com/bug.php?id=103390): Can't query `CHAR(36)` column if `MySqlCommand` is prepared~~
288288
* ~~[#103430](https://bugs.mysql.com/bug.php?id=103430): Can't connect using named pipe on Windows~~
289-
* [#103801](https://bugs.mysql.com/bug.php?id=103801): `TimeSpan` parameters lose microseconds with prepared statement
289+
* ~~[#103801](https://bugs.mysql.com/bug.php?id=103801): `TimeSpan` parameters lose microseconds with prepared statement~~
290290
* [#103819](https://bugs.mysql.com/bug.php?id=103819): Can't use `StringBuilder` containing non-BMP characters as `MySqlParameter.Value`
291291
* [#104910](https://bugs.mysql.com/bug.php?id=104910): `MySqlConnectionStringBuilder.TryGetValue` always returns `false`
292292
* [#104913](https://bugs.mysql.com/bug.php?id=104913): Cannot execute stored procedure with backtick in name
293-
* [#105209](https://bugs.mysql.com/bug.php?id=105209): Timespan value of zero can't be read with prepared command
293+
* ~~[#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
295295
* [#105730](https://bugs.mysql.com/bug.php?id=105730): `MySqlCommand.Clone` doesn't clone attributes
296296
* [#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`
299+
* [#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`

tests/MySqlConnector.Tests/MySqlConnectionStringBuilderTests.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public void ParseConnectionString()
161161
"ssl-cert=client-cert.pem;" +
162162
"ssl-key=client-key.pem;" +
163163
"ssl mode=verifyca;" +
164-
"tls version=Tls10, TLS v1.2;" +
164+
"tls version=Tls12, TLS v1.3;" +
165165
"Uid=username;" +
166166
"useaffectedrows=true"
167167
};
@@ -225,9 +225,9 @@ public void ParseConnectionString()
225225
Assert.Equal("client-key.pem", csb.SslKey);
226226
Assert.Equal(MySqlSslMode.VerifyCA, csb.SslMode);
227227
#if BASELINE
228-
Assert.Equal("Tls, Tls12", csb.TlsVersion);
228+
Assert.Equal("Tls12, Tls13", csb.TlsVersion);
229229
#else
230-
Assert.Equal("TLS 1.0, TLS 1.2", csb.TlsVersion);
230+
Assert.Equal("TLS 1.2, TLS 1.3", csb.TlsVersion);
231231
#endif
232232
Assert.True(csb.UseAffectedRows);
233233
Assert.True(csb.UseCompression);
@@ -399,6 +399,7 @@ public void SetServerSPNToNull()
399399
#endif
400400

401401
[Theory]
402+
#if !BASELINE
402403
[InlineData("Tls", "0")]
403404
[InlineData("Tls1", "0")]
404405
[InlineData("Tlsv1", "0")]
@@ -410,6 +411,7 @@ public void SetServerSPNToNull()
410411
[InlineData("Tlsv1.1", "1")]
411412
[InlineData("TLS 1.1", "1")]
412413
[InlineData("TLS v1.1", "1")]
414+
#endif
413415
[InlineData("Tls12", "2")]
414416
[InlineData("Tlsv12", "2")]
415417
[InlineData("Tlsv1.2", "2")]
@@ -420,10 +422,13 @@ public void SetServerSPNToNull()
420422
[InlineData("Tlsv1.3", "3")]
421423
[InlineData("TLS 1.3", "3")]
422424
[InlineData("TLS v1.3", "3")]
425+
#if !BASELINE
423426
[InlineData("Tls,Tls", "0")]
424427
[InlineData("Tls1.1,Tls v1.1, TLS 1.1", "1")]
425428
[InlineData("Tls12,Tls10", "0,2")]
426429
[InlineData("TLS v1.3, TLS12, Tls 1.1", "1,2,3")]
430+
#endif
431+
[InlineData("TLS v1.3, TLS12", "2,3")]
427432
public void ParseTlsVersion(string input, string expected)
428433
{
429434
var csb = new MySqlConnectionStringBuilder { TlsVersion = input };

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)' == 'Baseline' ">
35-
<PackageReference Include="MySql.Data" Version="8.0.27" />
35+
<PackageReference Include="MySql.Data" Version="8.0.28" />
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

tests/SideBySide/ConnectAsync.cs

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

15-
[Fact]
15+
[SkippableFact(Baseline = "https://bugs.mysql.com/bug.php?id=106242")]
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-
[Fact]
30+
[SkippableFact(Baseline = "https://bugs.mysql.com/bug.php?id=106242")]
3131
public async Task ConnectBadPort()
3232
{
3333
var csb = new MySqlConnectionStringBuilder
@@ -51,7 +51,7 @@ public async Task ConnectBadPassword()
5151
Assert.Equal(ConnectionState.Closed, connection.State);
5252
}
5353

54-
[Fact]
54+
[SkippableFact(Baseline = "https://bugs.mysql.com/bug.php?id=106243")]
5555
public async Task ConnectCanceled()
5656
{
5757
using var cts = new CancellationTokenSource();

tests/SideBySide/ConnectSync.cs

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

12-
[Fact]
12+
[SkippableFact(Baseline = "https://bugs.mysql.com/bug.php?id=106242")]
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-
[Fact]
30+
[SkippableFact(Baseline = "https://bugs.mysql.com/bug.php?id=106242")]
3131
public void ConnectBadPort()
3232
{
3333
var csb = new MySqlConnectionStringBuilder

tests/SideBySide/DataTypes.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
using GetGuidWhenNullException = MySql.Data.MySqlClient.MySqlException;
1414
using GetBytesWhenNullException = System.NullReferenceException;
1515
using GetGeometryWhenNullException = System.Exception;
16+
using GetStreamWhenNullException = System.ArgumentNullException;
1617
#else
1718
using GetValueWhenNullException = System.InvalidCastException;
1819
using GetGuidWhenNullException = System.InvalidCastException;
1920
using GetBytesWhenNullException = System.InvalidCastException;
2021
using GetGeometryWhenNullException = System.InvalidCastException;
22+
using GetStreamWhenNullException = System.InvalidCastException;
2123
#endif
2224

2325
namespace SideBySide;
@@ -771,11 +773,7 @@ insert into date_time_kind(d, dt0, dt1, dt2, dt3, dt4, dt5, dt6) values(?, ?, ?,
771773
[InlineData("`Time`", "TIME", new object[] { null, "-838 -59 -59", "838 59 59", "0 0 0", "0 14 3 4 567890" })]
772774
public void QueryTime(string column, string dataTypeName, object[] expected)
773775
{
774-
DoQuery("times", column, dataTypeName, ConvertToTimeSpan(expected), reader => reader.GetTimeSpan(0)
775-
#if BASELINE // https://bugs.mysql.com/bug.php?id=103801
776-
, omitWherePrepareTest: true
777-
#endif
778-
);
776+
DoQuery("times", column, dataTypeName, ConvertToTimeSpan(expected), reader => reader.GetTimeSpan(0));
779777
}
780778

781779
#if NET6_0_OR_GREATER && !BASELINE
@@ -816,8 +814,8 @@ public void QueryBlob(string column, int padLength)
816814
Array.Resize(ref data, padLength);
817815

818816
DoQuery<GetBytesWhenNullException>("blobs", "`" + column + "`", "BLOB", new object[] { null, data }, GetBytes);
819-
#if !BASELINE // https://bugs.mysql.com/bug.php?id=93374
820-
DoQuery("blobs", "`" + column + "`", "BLOB", new object[] { null, data }, GetStreamBytes);
817+
DoQuery<GetStreamWhenNullException>("blobs", "`" + column + "`", "BLOB", new object[] { null, data }, GetStreamBytes);
818+
#if !BASELINE // https://bugs.mysql.com/bug.php?id=106244
821819
DoQuery("blobs", "`" + column + "`", "BLOB", new object[] { null, data }, reader => reader.GetStream(0), matchesDefaultType: false, assertEqual: (e, a) =>
822820
{
823821
using var stream = (Stream) a;

tests/SideBySide/ParameterTests.cs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,13 @@ public void DbTypesToMySqlDbTypes(DbType[] dbTypes, MySqlDbType[] mySqlDbTypes)
5959
public void ConstructorSimple()
6060
{
6161
var parameter = new MySqlParameter();
62+
Assert.Equal(MySqlDbType.VarChar, parameter.MySqlDbType);
63+
Assert.Equal(DbType.String, parameter.DbType);
6264
#if BASELINE
6365
Assert.Null(parameter.ParameterName);
64-
Assert.Equal(MySqlDbType.Decimal, parameter.MySqlDbType);
65-
Assert.Equal(DbType.AnsiString, parameter.DbType);
6666
Assert.Null(parameter.SourceColumn);
6767
#else
6868
Assert.Equal("", parameter.ParameterName);
69-
Assert.Equal(MySqlDbType.VarChar, parameter.MySqlDbType);
70-
Assert.Equal(DbType.String, parameter.DbType);
7169
Assert.Equal("", parameter.SourceColumn);
7270
#endif
7371
Assert.False(parameter.IsNullable);
@@ -116,11 +114,7 @@ public void ConstructorNameType()
116114
Assert.Equal(MySqlDbType.Double, parameter.MySqlDbType);
117115
Assert.Equal(DbType.Double, parameter.DbType);
118116
Assert.False(parameter.IsNullable);
119-
#if BASELINE // https://bugs.mysql.com/bug.php?id=101253
120-
Assert.Equal(0, parameter.Value);
121-
#else
122117
Assert.Null(parameter.Value);
123-
#endif
124118
Assert.Equal(ParameterDirection.Input, parameter.Direction);
125119
Assert.Equal(0, parameter.Precision);
126120
Assert.Equal(0, parameter.Scale);
@@ -145,11 +139,7 @@ public void ConstructorNameTypeSize()
145139
Assert.Equal(MySqlDbType.Double, parameter.MySqlDbType);
146140
Assert.Equal(DbType.Double, parameter.DbType);
147141
Assert.False(parameter.IsNullable);
148-
#if BASELINE // https://bugs.mysql.com/bug.php?id=101253
149-
Assert.Equal(0, parameter.Value);
150-
#else
151142
Assert.Null(parameter.Value);
152-
#endif
153143
Assert.Equal(ParameterDirection.Input, parameter.Direction);
154144
Assert.Equal(0, parameter.Precision);
155145
Assert.Equal(0, parameter.Scale);
@@ -174,11 +164,7 @@ public void ConstructorNameTypeSizeSourceColumn()
174164
Assert.Equal(MySqlDbType.Int32, parameter.MySqlDbType);
175165
Assert.Equal(DbType.Int32, parameter.DbType);
176166
Assert.False(parameter.IsNullable);
177-
#if BASELINE // https://bugs.mysql.com/bug.php?id=101253
178-
Assert.Equal(0, parameter.Value);
179-
#else
180167
Assert.Null(parameter.Value);
181-
#endif
182168
Assert.Equal(ParameterDirection.Input, parameter.Direction);
183169
Assert.Equal(0, parameter.Precision);
184170
Assert.Equal(0, parameter.Scale);

tests/SideBySide/QueryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ public void QueryDateTimeLiteral()
13391339
Assert.Equal(MySqlDbType.DateTime, providerType);
13401340
}
13411341

1342-
[SkippableTheory(Baseline = "https://bugs.mysql.com/bug.php?id=105209")]
1342+
[Theory]
13431343
[InlineData(false)]
13441344
[InlineData(true)]
13451345
public void QueryTimeSpan(bool prepare)

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.27" />
55+
<PackageReference Include="MySql.Data" Version="8.0.28" />
5656
<Using Include="MySql.Data.MySqlClient" />
5757
</ItemGroup>
5858

0 commit comments

Comments
 (0)