Skip to content

Commit cd6c8ee

Browse files
committed
Merge branch 'main' into Fix-SqlConnectionPoolGroupProviderInfo-FailOverPartnerKeyMissing
2 parents 725259d + 4e3aa5e commit cd6c8ee

File tree

146 files changed

+3520
-5627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+3520
-5627
lines changed

CHANGELOG.md

+42
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,48 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66

7+
## [Preview Release 5.0.0-preview3.22168.1] - 2022-06-16
8+
9+
This update brings the below changes over the previous release:
10+
11+
### Breaking changes over preview release v5.0.0-preview2
12+
13+
- Dropped classes from the `Microsoft.Data.SqlClient.Server` namespace and replaced them with supported types from the [Microsoft.SqlServer.Server](https://github.com/dotnet/SqlClient/tree/main/src/Microsoft.SqlServer.Server) package.[#1585](https://github.com/dotnet/SqlClient/pull/1585) The affected classes and enums are:
14+
- Microsoft.Data.SqlClient.Server.IBinarySerialize -> Microsoft.SqlServer.Server.IBinarySerialize
15+
- Microsoft.Data.SqlClient.Server.InvalidUdtException -> Microsoft.SqlServer.Server.InvalidUdtException
16+
- Microsoft.Data.SqlClient.Server.SqlFacetAttribute -> Microsoft.SqlServer.Server.SqlFacetAttribute
17+
- Microsoft.Data.SqlClient.Server.SqlFunctionAttribute -> Microsoft.SqlServer.Server.SqlFunctionAttribute
18+
- Microsoft.Data.SqlClient.Server.SqlMethodAttribute -> Microsoft.SqlServer.Server.SqlMethodAttribute
19+
- Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregateAttribute -> Microsoft.SqlServer.Server.SqlUserDefinedAggregateAttribute
20+
- Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute -> Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute
21+
- (enum) Microsoft.Data.SqlClient.Server.DataAccessKind -> Microsoft.SqlServer.Server.DataAccessKind
22+
- (enum) Microsoft.Data.SqlClient.Server.Format -> Microsoft.SqlServer.Server.Format
23+
- (enum) Microsoft.Data.SqlClient.Server.SystemDataAccessKind -> Microsoft.SqlServer.Server.SystemDataAccessKind
24+
25+
### Added
26+
27+
- Added support for `TDS 8`. To use TDS 8, users should specify Encrypt=Strict in the connection string. Strict mode disables TrustServerCertificate (always treated as False in Strict mode). HostNameInCertificate has been added to help some Strict mode scenarios. [#1608](https://github.com/dotnet/SqlClient/pull/1608)
28+
- Added support for specifying Server SPN and Failover Server SPN on the connection. [#1607](https://github.com/dotnet/SqlClient/pull/1607)
29+
- Added support for aliases when targeting .NET Core on Windows. [#1588](https://github.com/dotnet/SqlClient/pull/1588)
30+
31+
### Fixed
32+
33+
- Fixed naming, order, and formatting for `SqlDiagnosticsListener` on .NET Core and .NET. [#1637] (https://github.com/dotnet/SqlClient/pull/1637)
34+
- Fixed NullReferenceException during Azure Active Directory authentication. [#1625] (https://github.com/dotnet/SqlClient/pull/1625)
35+
- Added CommandText length validation when using stored procedure command types. [#1484](https://github.com/dotnet/SqlClient/pull/1484)
36+
- Fixed `GetSchema("StructuredTypeMembers")` to return correct schema information. [#1500] (https://github.com/dotnet/SqlClient/pull/1500), [#1639](https://github.com/dotnet/SqlClient/pull/1639)
37+
- Fixed NullReferenceException when using `SqlDependency.Start` against an Azure SQL Database.[#1294] (https://github.com/dotnet/SqlClient/pull/1294)
38+
- Send the correct retained transaction descriptor in the MARS TDS Header when there is no current transaction on .NET 5+ and .NET Core. [#1624] (https://github.com/dotnet/SqlClient/pull/1624)
39+
- Parallelize SSRP requests (instance name resolution) on Linux and macOS when MultiSubNetFailover is specified. [#1578] (https://github.com/dotnet/SqlClient/pull/1578)
40+
- Adjust the default ConnectRetryCount against Azure Synapse OnDemand endpoints [#1626] (https://github.com/dotnet/SqlClient/pull/1626)
41+
42+
### Changed
43+
44+
- Code health improvements [#1353](https://github.com/dotnet/SqlClient/pull/1353) [#1354](https://github.com/dotnet/SqlClient/pull/1354) [#1525](https://github.com/dotnet/SqlClient/pull/1525) [#1186](https://github.com/dotnet/SqlClient/pull/1186)
45+
- Update Azure Identity dependency from 1.5.0 to 1.6.0.[#1611](https://github.com/dotnet/SqlClient/pull/1611)
46+
- Improved Regex for SqlCommandSet [#1548] (https://github.com/dotnet/SqlClient/pull/1548)
47+
- Rework on `TdsParserStateObjectManaged` with nullable annotations. [#1555] (https://github.com/dotnet/SqlClient/pull/1555)
48+
749
## [Preview Release 5.0.0-preview2.22096.2] - 2022-04-06
850

951
This update brings the below changes over the previous release:

build.proj

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<Target Name="BuildAll" DependsOnTargets="BuildSqlServerLib;BuildNetFx;BuildNetCore" />
7272
<Target Name="BuildAllConfigurations" DependsOnTargets="Restore;BuildTools;BuildSqlServerLib;BuildNetFx;BuildNetCoreAllOS;GenerateNugetPackage" />
7373
<Target Name="BuildSqlServerPackage" DependsOnTargets="BuildSqlServerLibAnyOS;GenerateSqlServerPackage"/>
74-
<Target Name="BuildTestsNetCore" DependsOnTargets="RestoreTestsNetCore;BuildAKVNetCore;BuildFunctionalTestsNetCore;BuildManualTestsNetCore"/>
74+
<Target Name="BuildTestsNetCore" DependsOnTargets="BuildSqlServerLib;RestoreTestsNetCore;BuildAKVNetCore;BuildFunctionalTestsNetCore;BuildManualTestsNetCore"/>
7575
<Target Name="BuildTestsNetFx" DependsOnTargets="BuildSqlServerLib;RestoreTestsNetFx;BuildAKVNetFx;BuildFunctionalTestsNetFx;BuildManualTestsNetFx" Condition="$(IsEnabledWindows) == 'true'"/>
7676
<Target Name="BuildTests" DependsOnTargets="BuildTestsNetCore;BuildTestsNetFx"/>
7777

@@ -113,7 +113,9 @@
113113
</Target>
114114

115115
<Target Name="BuildSqlServerLib" DependsOnTargets="RestoreSqlServerLib">
116+
<!-- Only build platform specific builds for Package reference types -->
116117
<MSBuild Projects="@(SqlServerLib)" Properties="$(CI);$(SqlServerLibProperties);Platform=AnyCPU;" RemoveProperties="TargetsWindows;TargetsUnix;" />
118+
<MSBuild Projects="@(SqlServerLib)" Properties="$(CI);$(SqlServerLibProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))"/>
117119
</Target>
118120

119121
<Target Name="BuildNetCore" DependsOnTargets="RestoreNetCore">

doc/samples/IBinarySerialize.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.IO;
33
using System.Data;
44
using System.Data.SqlTypes;
5-
using Microsoft.Data.SqlClient.Server;
5+
using Microsoft.SqlServer.Server;
66
using System.Text;
77

88
namespace test
@@ -45,7 +45,7 @@ static void Main(string[] args)
4545
// Bytes 0 - 19: string text, padded to the right with null characters
4646
// Bytes 20+: Double value
4747

48-
// using Microsoft.Data.SqlClient.Server;
48+
// using Microsoft.SqlServer.Server;
4949
public void Read(System.IO.BinaryReader r)
5050
{
5151

@@ -84,7 +84,7 @@ public void Read(System.IO.BinaryReader r)
8484
// Bytes 0 - 19: string text, padded to the right with null characters
8585
// Bytes 20+: Double value
8686

87-
// using Microsoft.Data.SqlClient.Server;
87+
// using Microsoft.SqlServer.Server;
8888
public void Write(System.IO.BinaryWriter w)
8989
{
9090
int maxStringSize = 20;

doc/samples/SqlConnection_BeginTransaction.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private static void ExecuteSqlTransaction(string connectionString)
2424
SqlTransaction transaction;
2525

2626
// Start a local transaction.
27-
transaction = connection.BeginTransaction("SampleTransaction");
27+
transaction = connection.BeginTransaction();
2828

2929
// Must assign both transaction object and connection
3030
// to Command object for a pending local transaction

doc/samples/SqlConnection_BeginTransaction2.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private static void ExecuteSqlTransaction(string connectionString)
5252
// Attempt to roll back the transaction.
5353
try
5454
{
55-
transaction.Rollback();
55+
transaction.Rollback("SampleTransaction");
5656
}
5757
catch (Exception ex2)
5858
{

doc/samples/SqlConnection_BeginTransaction3.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private static void ExecuteSqlTransaction(string connectionString)
4747
{
4848
try
4949
{
50-
transaction.Rollback();
50+
transaction.Rollback("SampleTransaction");
5151
}
5252
catch (SqlException ex)
5353
{

doc/samples/SqlFunctionAttribute.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.IO;
33
using System.Collections;
44
//<Snippet1>
5-
using Microsoft.Data.SqlClient.Server;
5+
using Microsoft.SqlServer.Server;
66

77
public class Class1
88
{

doc/samples/SqlUserDefinedAggregate.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
using System;
22
//<Snippet1>
3-
using Microsoft.Data.SqlClient.Server;
3+
using Microsoft.SqlServer.Server;
44
using System.IO;
55
using System.Data.Sql;
66
using System.Data.SqlTypes;
77
using System.Text;
88

99
[Serializable]
10-
[Microsoft.Data.SqlClient.Server.SqlUserDefinedAggregate(
11-
Microsoft.Data.SqlClient.Server.Format.UserDefined,
10+
[Microsoft.SqlServer.Server.SqlUserDefinedAggregate(
11+
Microsoft.SqlServer.Server.Format.UserDefined,
1212
IsInvariantToNulls = true,
1313
IsInvariantToDuplicates = false,
1414
IsInvariantToOrder = false,
1515
MaxByteSize = 8000)
1616
]
17-
public class Concatenate : Microsoft.Data.SqlClient.Server.IBinarySerialize
17+
public class Concatenate : Microsoft.SqlServer.Server.IBinarySerialize
1818
{
1919

2020
public void Read(BinaryReader r)

doc/samples/SqlUserDefinedType1.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//<Snippet5>
33
using System;
44
using System.Data.SqlTypes;
5-
using Microsoft.Data.SqlClient.Server;
5+
using Microsoft.SqlServer.Server;
66

77
[Serializable()]
88
[SqlUserDefinedType(Format.Native)]
@@ -133,7 +133,7 @@ public SqlString Quadrant()
133133

134134
//-----------------------------------------------------------------------------
135135
//<Snippet12>
136-
// using Microsoft.Data.SqlClient.Server;
136+
// using Microsoft.SqlServer.Server;
137137

138138
[SqlUserDefinedType(Format.Native, MaxByteSize = 8000)]
139139
public class SampleType

doc/snippets/Microsoft.Data.SqlClient.Server/DataAccessKind.xml

-26
This file was deleted.

doc/snippets/Microsoft.Data.SqlClient.Server/Format.xml

-51
This file was deleted.

doc/snippets/Microsoft.Data.SqlClient.Server/IBinarySerialize.xml

-54
This file was deleted.

0 commit comments

Comments
 (0)