Skip to content

Commit

Permalink
Merge branch 'main' into MergeShared-TdsEnums
Browse files Browse the repository at this point in the history
  • Loading branch information
lcheunglci committed Oct 22, 2021
2 parents c03f6fd + fc10bbc commit 431f1b7
Show file tree
Hide file tree
Showing 24 changed files with 254 additions and 71 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@ All notable changes to this project will be documented in this file.

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

## [Preview Release 4.0.0-preview3.21293.2] - 2021-10-20

This update brings the below changes over the previous release:

### Breaking changes over preview release v4.0.0-preview2

- Dropped support for .NET Core 2.1 [#1272](https://github.com/dotnet/SqlClient/pull/1272)
- [.NET Framework] Exception will not be thrown if a User ID is provided in the connection string when using `Active Directory Integrated` authentication [#1359](https://github.com/dotnet/SqlClient/pull/1359)

### Added

- Add `GetFieldValueAsync<T>` and `GetFieldValue<T>` support for `XmlReader`, `TextReader`, `Stream` [#1019](https://github.com/dotnet/SqlClient/pull/1019)

### Fixed

- Fixed `FormatException` when opening a connection with event tracing enabled [#1291](https://github.com/dotnet/SqlClient/pull/1291)
- Fixed improper initialization of `ActiveDirectoryAuthenticationProvider` [#1328](https://github.com/dotnet/SqlClient/pull/1328)
- Fixed `MissingMethodException` when accessing `SqlAuthenticationParameters.ConnectionTimeout` [#1336](https://github.com/dotnet/SqlClient/pull/1336)
- Fixed data corruption issues by reverting changes to async cancellations [#1352](https://github.com/dotnet/SqlClient/pull/1352)
- Fixed performance degradation by reverting changes to MARS state machine [#1357](https://github.com/dotnet/SqlClient/pull/1357)
- Fixed bug where environment variables are ignored when using `Active Directory Default` authentication [#1360](https://github.com/dotnet/SqlClient/pull/1360)

### Changed

- Removed attributes for classes used in Microsoft.VSDesigner due to lack of support for Microsoft.Data.SqlClient [#1296](https://github.com/dotnet/SqlClient/pull/1296)
- Disable encryption when connecting to SQL LocalDB [#1312](https://github.com/dotnet/SqlClient/pull/1312)
- Various code health and performance improvements. See [milestone](https://github.com/dotnet/SqlClient/milestone/31?closed=1) for more info.

## [Preview Release 4.0.0-preview2.21264.2] - 2021-09-21

This update brings the below changes over the previous release:
Expand Down
118 changes: 118 additions & 0 deletions release-notes/4.0/4.0.0-preview3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Release Notes

## Microsoft.Data.SqlClient 4.0.0-preview3.21293.2 released 20 October 2021

This update brings the below changes over the previous release:

### Breaking changes over preview release v4.0.0-preview2

- Dropped support for .NET Core 2.1 [#1272](https://github.com/dotnet/SqlClient/pull/1272)
- [.NET Framework] Exception will not be thrown if a User ID is provided in the connection string when using `Active Directory Integrated` authentication [#1359](https://github.com/dotnet/SqlClient/pull/1359)

### Added

- Add `GetFieldValueAsync<T>` and `GetFieldValue<T>` support for `XmlReader`, `TextReader`, `Stream` [#1019](https://github.com/dotnet/SqlClient/pull/1019). [Read more](#getfieldvalueasynct-and-getfieldvaluet-support-for-xmlreader-textreader-stream-types)

### Fixed

- Fixed `FormatException` when opening a connection with event tracing enabled [#1291](https://github.com/dotnet/SqlClient/pull/1291)
- Fixed improper initialization of `ActiveDirectoryAuthenticationProvider` [#1328](https://github.com/dotnet/SqlClient/pull/1328)
- Fixed `MissingMethodException` when accessing `SqlAuthenticationParameters.ConnectionTimeout` [#1336](https://github.com/dotnet/SqlClient/pull/1336)
- Fixed data corruption issues by reverting changes to async cancellations [#1352](https://github.com/dotnet/SqlClient/pull/1352)
- Fixed performance degradation by reverting changes to MARS state machine [#1357](https://github.com/dotnet/SqlClient/pull/1357)
- Fixed bug where environment variables are ignored when using `Active Directory Default` authentication [#1360](https://github.com/dotnet/SqlClient/pull/1360)

### Changed

- Removed attributes for classes used in Microsoft.VSDesigner due to lack of support for Microsoft.Data.SqlClient [#1296](https://github.com/dotnet/SqlClient/pull/1296)
- Disable encryption when connecting to SQL LocalDB [#1312](https://github.com/dotnet/SqlClient/pull/1312)
- Various code health and performance improvements. See [milestone](https://github.com/dotnet/SqlClient/milestone/31?closed=1) for more info.

## New features over preview release v4.0.0-preview2

### `GetFieldValueAsync<T>` and `GetFieldValue<T>` support for `XmlReader`, `TextReader`, `Stream` types

`XmlReader`, `TextReader`, `Stream` types are now supported when using `GetFieldValueAsync<T>` and `GetFieldValue<T>`.

Example usage:

```cs
using (SqlConnection connection = new SqlConnection(connectionString))
{
using (SqlCommand command = new SqlCommand(query, connection))
{
connection.Open();
using (SqlDataReader reader = await command.ExecuteReaderAsync())
{
if (await reader.ReadAsync())
{
using (Stream stream = await reader.GetFieldValueAsync<Stream>(1))
{
// Continue to read from stream
}
}
}
}
}
```

## Target Platform Support

- .NET Framework 4.6.1+ (Windows x86, Windows x64)
- .NET Core 3.1+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS)

### Dependencies

#### .NET Framework

- Microsoft.Data.SqlClient.SNI 4.0.0-preview1.21232.1
- Azure.Identity 1.3.0
- Microsoft.Identity.Client 4.22.0
- Microsoft.IdentityModel.JsonWebTokens 6.8.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0
- System.Buffers 4.5.1
- System.Configuration.ConfigurationManager 5.0.0
- System.IO 4.3.0
- System.Runtime.InteropServices.RuntimeInformation 4.3.0
- System.Security.Cryptography.Algorithms 4.3.1
- System.Security.Cryptography.Primitives 4.3.0
- System.Text.Encodings.Web 4.7.2

#### .NET Core

- Microsoft.Data.SqlClient.SNI.runtime 4.0.0-preview1.21232.1
- Azure.Identity 1.3.0
- Microsoft.Identity.Client 4.22.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0
- Microsoft.IdentityModel.JsonWebTokens 6.8.0
- Microsoft.Win32.Registry 5.0.0
- System.Buffers 4.5.1
- System.Configuration.ConfigurationManager 5.0.0
- System.Diagnostics.DiagnosticSource 5.0.0
- System.IO 4.3.0
- System.Runtime.Caching 5.0.0
- System.Text.Encoding.CodePages 5.0.0
- System.Text.Encodings.Web 4.7.2
- System.Resources.ResourceManager 4.3.0
- System.Security.Cryptography.Cng 5.0.0
- System.Security.Principal.Windows 5.0.0

#### .NET Standard

- Microsoft.Data.SqlClient.SNI.runtime 4.0.0-preview1.21232.1
- Azure.Identity 1.3.0
- Microsoft.Identity.Client 4.22.0
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0
- Microsoft.IdentityModel.JsonWebTokens 6.8.0
- Microsoft.Win32.Registry 5.0.0
- System.Buffers 4.5.1
- System.Configuration.ConfigurationManager 5.0.0
- System.IO 4.3.0
- System.Runtime.Caching 5.0.0
- System.Text.Encoding.CodePages 5.0.0
- System.Text.Encodings.Web 4.7.2
- System.Resources.ResourceManager 4.3.0
- System.Runtime.Loader 4.3.0
- System.Security.Cryptography.Cng 5.0.0
- System.Security.Principal.Windows 5.0.0
1 change: 1 addition & 0 deletions release-notes/4.0/4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ The following Microsoft.Data.SqlClient 4.0 preview releases have been shipped:

| Release Date | Version | Notes |
| :-- | :-- | :--: |
| 2021/10/20 | 4.0.0-preview3.21293.2 | [release notes](4.0.0-preview3.md) |
| 2021/09/21 | 4.0.0-preview2.21264.2 | [release notes](4.0.0-preview2.md) |
| 2021/08/25 | 4.0.0-preview1.21237.2 | [release notes](4.0.0-preview1.md) |
1 change: 1 addition & 0 deletions release-notes/4.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ The following Microsoft.Data.SqlClient 4.0 preview releases have been shipped:

| Release Date | Version | Notes |
| :-- | :-- | :--: |
| 2021/10/20 | 4.0.0-preview3.21293.2 | [release notes](4.0.0-preview3.md) |
| 2021/09/21 | 4.0.0-preview2.21264.2 | [release notes](4.0.0-preview2.md) |
| 2021/08/25 | 4.0.0-preview1.21237.2 | [release notes](4.0.0-preview1.md) |
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,10 @@
</ItemGroup>
<!-- Resources -->
<ItemGroup>
<Compile Include="Resources\$(ResxFileName).Designer.cs">
<Compile Include="Resources\Strings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>$(ResxFileName).resx</DependentUpon>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
<Compile Include="..\..\src\Resources\StringsHelper.cs">
<Link>Resources\StringsHelper.cs</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2267,15 +2267,6 @@ internal TdsParser Parser
}
}

internal bool Asynchronous
{
get
{
SqlConnectionString constr = (SqlConnectionString)ConnectionOptions;
return ((null != constr) ? constr.Asynchronous : SqlConnectionString.DEFAULT.Asynchronous);
}
}

//
// INTERNAL METHODS
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@ static internal Exception AuthenticationAndIntegratedSecurity()
{
return ADP.Argument(StringsHelper.GetString(Strings.SQL_AuthenticationAndIntegratedSecurity));
}
static internal Exception IntegratedWithUserIDAndPassword()
static internal Exception IntegratedWithPassword()
{
return ADP.Argument(StringsHelper.GetString(Strings.SQL_IntegratedWithUserIDAndPassword));
return ADP.Argument(StringsHelper.GetString(Strings.SQL_IntegratedWithPassword));
}
static internal Exception InteractiveWithPassword()
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@
<data name="SQL_AuthenticationAndIntegratedSecurity" xml:space="preserve">
<value>"Authentication" kann nicht mit "Integrated Security" verwendet werden.</value>
</data>
<data name="SQL_IntegratedWithUserIDAndPassword" xml:space="preserve">
<value>"Authentication=Active Directory Integrated" kann nicht mit den Schlüsselwörtern "User ID", "UID", "Password" oder "PWD" für die Verbindungszeichenfolge verwendet werden.</value>
<data name="SQL_IntegratedWithPassword" xml:space="preserve">
<value>"Authentication=Active Directory Integrated" kann nicht mit den Schlüsselwörtern "Password" oder "PWD" für die Verbindungszeichenfolge verwendet werden.</value>
</data>
<data name="SQL_InteractiveWithPassword" xml:space="preserve">
<value>"Authentication=Active Directory Interactive" kann nicht mit den Schlüsselwörtern "Password" oder "PWD" für die Verbindungszeichenfolge verwendet werden.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@
<data name="SQL_AuthenticationAndIntegratedSecurity" xml:space="preserve">
<value>No se puede usar 'Authentication' con 'Integrated Security'.</value>
</data>
<data name="SQL_IntegratedWithUserIDAndPassword" xml:space="preserve">
<value>No se puede usar "Authentication=Active Directory Integrated" con las palabras clave de cadena de conexión "User ID", "UID", "Password" ni "PWD".</value>
<data name="SQL_IntegratedWithPassword" xml:space="preserve">
<value>Cannot use 'Authentication=Active Directory Integrated' with 'Password' or 'PWD' connection string keywords.</value>
</data>
<data name="SQL_InteractiveWithPassword" xml:space="preserve">
<value>No se puede usar "Authentication=Active Directory Interactive" con las palabras clave de cadena de conexión "Password" ni "PWD".</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@
<data name="SQL_AuthenticationAndIntegratedSecurity" xml:space="preserve">
<value>Impossible d'utiliser 'Authentication avec 'Integrated Security'.</value>
</data>
<data name="SQL_IntegratedWithUserIDAndPassword" xml:space="preserve">
<value>Impossible d'utiliser 'Authentication=Active Directory Integrated' avec les mots clés de la chaîne de connexion 'User ID", "UID", "Password" ou "PWD".</value>
<data name="SQL_IntegratedWithPassword" xml:space="preserve">
<value>Impossible d'utiliser « Authentication=Active Directory Integrated » avec les mots clés de chaîne de connexion « Password » ou « PWD ».</value>
</data>
<data name="SQL_InteractiveWithPassword" xml:space="preserve">
<value>Impossible d'utiliser « Authentication=Active Directory Interactive » avec les mots clés de chaîne de connexion « Password » ou « PWD ».</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@
<data name="SQL_AuthenticationAndIntegratedSecurity" xml:space="preserve">
<value>Non è possibile usare 'Authentication' con 'Integrated Security'.</value>
</data>
<data name="SQL_IntegratedWithUserIDAndPassword" xml:space="preserve">
<value>Non è possibile usare 'Authentication=Active Directory Integrated' con le parole chiave della stringa di connessione 'User ID', 'UID', 'Password' o 'PWD'.</value>
<data name="SQL_IntegratedWithPassword" xml:space="preserve">
<value>Impossibile usare 'Authentication=Active Directory Integrated' con le parole chiave della stringa di connessione 'Password' o 'PWD'.</value>
</data>
<data name="SQL_InteractiveWithPassword" xml:space="preserve">
<value>Non è possibile usare 'Authentication=Active Directory Interactive' con le parole chiave della stringa di connessione 'Password' o 'PWD'.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@
<data name="SQL_AuthenticationAndIntegratedSecurity" xml:space="preserve">
<value>'Authentication' と 'Integrated Security' を一緒に使用することはできません。</value>
</data>
<data name="SQL_IntegratedWithUserIDAndPassword" xml:space="preserve">
<value>'Authentication=Active Directory Integrated' と接続文字列キーワード 'User ID'、'UID'、'Password''PWD' を一緒に使用することはできません。</value>
<data name="SQL_IntegratedWithPassword" xml:space="preserve">
<value>'Authentication=Active Directory Integrated' と接続文字列キーワード 'Password' または 'PWD' を一緒に使用することはできません。</value>
</data>
<data name="SQL_InteractiveWithPassword" xml:space="preserve">
<value>'Authentication=Active Directory Interactive' と接続文字列キーワード 'Password'、'PWD' を一緒に使用することはできません。</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@
<data name="SQL_AuthenticationAndIntegratedSecurity" xml:space="preserve">
<value>'Authentication'을 'Integrated Security'와 함께 사용할 수 없습니다.</value>
</data>
<data name="SQL_IntegratedWithUserIDAndPassword" xml:space="preserve">
<value>'Authentication=Active Directory Integrated'를 'User ID', 'UID', 'Password' 또는 'PWD' 연결 문자열 키워드와 함께 사용할 수 없습니다.</value>
<data name="SQL_IntegratedWithPassword" xml:space="preserve">
<value>Cannot use 'Authentication=Active Directory Integrated' with 'Password' or 'PWD' connection string keywords.</value>
</data>
<data name="SQL_InteractiveWithPassword" xml:space="preserve">
<value>'Authentication=Active Directory Interactive'를 'Password' 또는 'PWD' 연결 문자열 키워드와 함께 사용할 수 없습니다.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@
<data name="SQL_AuthenticationAndIntegratedSecurity" xml:space="preserve">
<value>Não é possível usar "Authentication" com "Integrated Security".</value>
</data>
<data name="SQL_IntegratedWithUserIDAndPassword" xml:space="preserve">
<value>Não é possível usar 'Authentication=Active Directory Integrated' com as palavras-chave de cadeia de conexão 'User ID', 'UID', 'Password' ou 'PWD'.</value>
<data name="SQL_IntegratedWithPassword" xml:space="preserve">
<value>Não é possível usar Authentication=Active Directory Integrated com as palavras-chave de cadeia de conexão Password ou PWD.</value>
</data>
<data name="SQL_InteractiveWithPassword" xml:space="preserve">
<value>Não é possível usar 'Authentication=Active Directory Interactive' com as palavras-chave de cadeia de conexão 'Password' ou 'PWD'.</value>
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@
<data name="SQL_AuthenticationAndIntegratedSecurity" xml:space="preserve">
<value>Cannot use 'Authentication' with 'Integrated Security'.</value>
</data>
<data name="SQL_IntegratedWithUserIDAndPassword" xml:space="preserve">
<value>Cannot use 'Authentication=Active Directory Integrated' with 'User ID', 'UID', 'Password' or 'PWD' connection string keywords.</value>
<data name="SQL_IntegratedWithPassword" xml:space="preserve">
<value>Cannot use 'Authentication=Active Directory Integrated' with 'Password' or 'PWD' connection string keywords.</value>
</data>
<data name="SQL_InteractiveWithPassword" xml:space="preserve">
<value>Cannot use 'Authentication=Active Directory Interactive' with 'Password' or 'PWD' connection string keywords.</value>
Expand Down Expand Up @@ -4617,4 +4617,4 @@
<data name="SQL_ParameterDirectionInvalidForOptimizedBinding" xml:space="preserve">
<value>Parameter '{0}' cannot have Direction Output or InputOutput when EnableOptimizedParameterBinding is enabled on the parent command.</value>
</data>
</root>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@
<data name="SQL_AuthenticationAndIntegratedSecurity" xml:space="preserve">
<value>Нельзя использовать 'Authentication' с 'Integrated Security'.</value>
</data>
<data name="SQL_IntegratedWithUserIDAndPassword" xml:space="preserve">
<value>Невозможно использовать "Authentication=Active Directory Integrated" с ключевыми словами строки подключения "User ID", "UID", "Password" или "PWD".</value>
<data name="SQL_IntegratedWithPassword" xml:space="preserve">
<value>Невозможно использовать "Authentication=Active Directory Integrated" с ключевыми словами "Password" или "PWD" в строке подключения.</value>
</data>
<data name="SQL_InteractiveWithPassword" xml:space="preserve">
<value>Невозможно использовать "Authentication=Active Directory Interactive" с ключевыми словами "Password" или "PWD" в строке подключения.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,8 @@
<data name="SQL_AuthenticationAndIntegratedSecurity" xml:space="preserve">
<value>无法对“Integrated Security”使用“Authentication”。</value>
</data>
<data name="SQL_IntegratedWithUserIDAndPassword" xml:space="preserve">
<value>无法对“User ID”、“UID”、“Password”或“PWD”连接字符串关键字使用“Authentication=Active Directory Integrated”。</value>
<data name="SQL_IntegratedWithPassword" xml:space="preserve">
<value>Cannot use 'Authentication=Active Directory Integrated' with 'Password' or 'PWD' connection string keywords.</value>
</data>
<data name="SQL_InteractiveWithPassword" xml:space="preserve">
<value>无法对 "Password" 或 "PWD" 连接字符串关键字使用 "Authentication=Active Directory Interactive"。</value>
Expand Down
Loading

0 comments on commit 431f1b7

Please sign in to comment.