From ca879b085a60f4aeb6abcbea21aeb8a962f13572 Mon Sep 17 00:00:00 2001 From: JRahnama Date: Thu, 8 Jun 2023 10:00:47 -0700 Subject: [PATCH 1/8] release notes --- CHANGELOG.md | 21 ++++++++ release-notes/5.2/5.2.0-preview2.md | 84 +++++++++++++++++++++++++++++ release-notes/5.2/5.2.0.md | 1 + release-notes/5.2/README.md | 5 ++ release-notes/README.md | 1 + 5 files changed, 112 insertions(+) create mode 100644 release-notes/5.2/5.2.0-preview2.md diff --git a/CHANGELOG.md b/CHANGELOG.md index e6106d6a41..509b59fe92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,27 @@ 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 5.2.0-preview2.x] - 2023-06-08 + +This update brings the below changes over the previous release: + +### Added + +- Added SQL Types compatibility with **.NET 8**. [1934](https://github.com/dotnet/SqlClient/pull/1934) +- Added support for **.NET 7.0**. [#1981](https://github.com/dotnet/SqlClient/pull/1981) +- Added new property `RowsCopied64` to `SqlBulkCopy`. [#2004](https://github.com/dotnet/SqlClient/pull/2004) +- Added minimum login timeout as 1 second as the default behavior on **.NET Core**. [#2012](https://github.com/dotnet/SqlClient/pull/2012) + +### Fixed + +- Fixed the mixed synchronization issue in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) +- Fixed the issue with `SqlConnectionStringBuilder` property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018) + +### Changed + +- Updated `Microsoft.Identity.Client` version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055) +- Code health improvements: [#1985](https://github.com/dotnet/SqlClient/pull/1985) + ## [Preview Release 5.2.0-preview1.23109.1] - 2023-04-20 This update brings the below changes over the previous release: diff --git a/release-notes/5.2/5.2.0-preview2.md b/release-notes/5.2/5.2.0-preview2.md new file mode 100644 index 0000000000..bf54528f58 --- /dev/null +++ b/release-notes/5.2/5.2.0-preview2.md @@ -0,0 +1,84 @@ +# Release Notes + +## [Preview Release 5.2.0-preview2.x] - 2023-06-08 + +This update brings the below changes over the previous release: + +### Added + +- Added SQL Types compatibility with **.NET 8**. [1934](https://github.com/dotnet/SqlClient/pull/1934) +- Added support for **.NET 7.0**. [#1981](https://github.com/dotnet/SqlClient/pull/1981) +- Added new property 'RowsCopied64' to SqlBulkCopy. [#2004](https://github.com/dotnet/SqlClient/pull/2004) +- Added minimum login timeout as 1 second as the default behavior on **.NET Core**. [#2012](https://github.com/dotnet/SqlClient/pull/2012) + +### Fixed + +- Fixed the mixed synchronization issue in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) +- Fixed the issue with SqlConnectionStringBuilder property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018) + +### Changed + +- Updated Microsoft.Identity.Client version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055) +- Code health improvements: [#1985](https://github.com/dotnet/SqlClient/pull/1985) + +## Target Platform Support + +- .NET Framework 4.6.2+ (Windows x86, Windows x64) +- .NET 6.0+ (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 5.1.0 +- Azure.Identity 1.8.0 +- Microsoft.Identity.Client 4.53.0 +- Microsoft.IdentityModel.JsonWebTokens 6.24.0 +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0 +- System.Buffers 4.5.1 +- System.Configuration.ConfigurationManager 6.0.1 +- 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.Encoding.Web 6.0.0 + +#### .NET + +- Microsoft.Data.SqlClient.SNI 5.1.0 +- Azure.Identity 1.8.0 +- Microsoft.Identity.Client 4.53.0 +- Microsoft.IdentityModel.JsonWebTokens 6.24.0 +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0 +- Microsoft.SqlServer.Server 1.0.0 +- System.Buffers 4.5.1 +- System.Configuration.ConfigurationManager 6.0.1 +- System.Diagnostics.DiagnosticSource 6.0.0 +- System.IO 4.3.0 +- System.Runtime.Caching 6.0.0 +- System.Text.Encoding.CodePages 6.0.0 +- System.Text.Encodings.Web 6.0.0 +- 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 5.1.0 +- Azure.Identity 1.6.0 +- Microsoft.Identity.Client 4.53.0 +- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.24.0 +- Microsoft.IdentityModel.JsonWebTokens 6.24.0 +- Microsoft.SqlServer.Server 1.0.0 +- Microsoft.Win32.Registry 5.0.0 +- System.Buffers 4.5.1 +- System.Configuration.ConfigurationManager 6.0.1 +- System.IO 4.3.0 +- System.Runtime.Caching 6.0.0 +- System.Text.Encoding.CodePages 6.0.0 +- System.Text.Encodings.Web 6.0.0 +- System.Runtime.Loader 4.3.0 +- System.Resources.ResourceManager 4.3.0 +- System.Security.Cryptography.Cng 5.0.0 +- System.Security.Principal.Windows 5.0.0 diff --git a/release-notes/5.2/5.2.0.md b/release-notes/5.2/5.2.0.md index c42efbe978..52db491caa 100644 --- a/release-notes/5.2/5.2.0.md +++ b/release-notes/5.2/5.2.0.md @@ -1,3 +1,4 @@ | Release Date | Version | Notes | | :-- | :-- | :--: | | 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) | +| 2023/06/08 | 5.2.0-preview2.x | [relese notes](5.2.0-preview2.md) | diff --git a/release-notes/5.2/README.md b/release-notes/5.2/README.md index c42efbe978..38fef5824b 100644 --- a/release-notes/5.2/README.md +++ b/release-notes/5.2/README.md @@ -1,3 +1,8 @@ +# Microsoft.Data.SqlClient 5.2 Releases + +The following Microsoft.Data.SqlClient 5.2 preview releases have been shipped: + | Release Date | Version | Notes | | :-- | :-- | :--: | | 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) | +| 2023/06/08 | 5.2.0-preview2.x | [release notes](5.2.0-preview2.md) | diff --git a/release-notes/README.md b/release-notes/README.md index 1246d732d3..f98322d8cb 100644 --- a/release-notes/README.md +++ b/release-notes/README.md @@ -4,6 +4,7 @@ The latest stable release is [Microsoft.Data.SqlClient 5.1](5.1). ## Release Information +- [Microsoft.Data.SqlClient 5.2](5.2) - [Microsoft.Data.SqlClient 5.1](5.1) - [Microsoft.Data.SqlClient 5.0](5.0) - [Microsoft.Data.SqlClient 4.1](4.1) From 5884cf9b0a83f595729b2e2c2bd5232e270f79be Mon Sep 17 00:00:00 2001 From: Javad Date: Thu, 8 Jun 2023 10:32:38 -0700 Subject: [PATCH 2/8] Apply suggestions from code review Co-authored-by: David Engel --- CHANGELOG.md | 9 ++++----- release-notes/5.2/5.2.0-preview2.md | 13 ++++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 509b59fe92..22dbd2b075 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,18 +10,17 @@ This update brings the below changes over the previous release: ### Added -- Added SQL Types compatibility with **.NET 8**. [1934](https://github.com/dotnet/SqlClient/pull/1934) -- Added support for **.NET 7.0**. [#1981](https://github.com/dotnet/SqlClient/pull/1981) - Added new property `RowsCopied64` to `SqlBulkCopy`. [#2004](https://github.com/dotnet/SqlClient/pull/2004) -- Added minimum login timeout as 1 second as the default behavior on **.NET Core**. [#2012](https://github.com/dotnet/SqlClient/pull/2012) ### Fixed -- Fixed the mixed synchronization issue in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) -- Fixed the issue with `SqlConnectionStringBuilder` property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018) +- Fixed mixed synchronization issue in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) +- Fixed issue with `SqlConnectionStringBuilder` property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018) ### Changed +- Moved to new System.Data.SqlTypes APIs in **.NET 7** and **.NET 8**. [1934](https://github.com/dotnet/SqlClient/pull/1934) and [#1981](https://github.com/dotnet/SqlClient/pull/1981) +- Changed **[UseOneSecFloorInTimeoutCalculationDuringLogin](https://learn.microsoft.com/sql/connect/ado-net/appcontext-switches#enable-a-minimum-timeout-during-login)** App Context switch default to **true** and extended its effect to .NET and .NET Standard. [#2012](https://github.com/dotnet/SqlClient/pull/2012) - Updated `Microsoft.Identity.Client` version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055) - Code health improvements: [#1985](https://github.com/dotnet/SqlClient/pull/1985) diff --git a/release-notes/5.2/5.2.0-preview2.md b/release-notes/5.2/5.2.0-preview2.md index bf54528f58..5798ce2b1c 100644 --- a/release-notes/5.2/5.2.0-preview2.md +++ b/release-notes/5.2/5.2.0-preview2.md @@ -6,19 +6,18 @@ This update brings the below changes over the previous release: ### Added -- Added SQL Types compatibility with **.NET 8**. [1934](https://github.com/dotnet/SqlClient/pull/1934) -- Added support for **.NET 7.0**. [#1981](https://github.com/dotnet/SqlClient/pull/1981) -- Added new property 'RowsCopied64' to SqlBulkCopy. [#2004](https://github.com/dotnet/SqlClient/pull/2004) -- Added minimum login timeout as 1 second as the default behavior on **.NET Core**. [#2012](https://github.com/dotnet/SqlClient/pull/2012) +- Added new property `RowsCopied64` to `SqlBulkCopy`. [#2004](https://github.com/dotnet/SqlClient/pull/2004) ### Fixed -- Fixed the mixed synchronization issue in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) -- Fixed the issue with SqlConnectionStringBuilder property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018) +- Fixed mixed synchronization issue in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) +- Fixed issue with `SqlConnectionStringBuilder` property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018) ### Changed -- Updated Microsoft.Identity.Client version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055) +- Moved to new System.Data.SqlTypes APIs in **.NET 7** and **.NET 8**. [1934](https://github.com/dotnet/SqlClient/pull/1934) and [#1981](https://github.com/dotnet/SqlClient/pull/1981) +- Changed **[UseOneSecFloorInTimeoutCalculationDuringLogin](https://learn.microsoft.com/sql/connect/ado-net/appcontext-switches#enable-a-minimum-timeout-during-login)** App Context switch default to **true** and extended its effect to .NET and .NET Standard. [#2012](https://github.com/dotnet/SqlClient/pull/2012) +- Updated `Microsoft.Identity.Client` version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055) - Code health improvements: [#1985](https://github.com/dotnet/SqlClient/pull/1985) ## Target Platform Support From ba90e55fb127d8753f24ebd88a15c6e12c00b003 Mon Sep 17 00:00:00 2001 From: Javad Date: Thu, 8 Jun 2023 11:01:24 -0700 Subject: [PATCH 3/8] Apply suggestions from code review Co-authored-by: DavoudEshtehari <61173489+DavoudEshtehari@users.noreply.github.com> --- CHANGELOG.md | 4 ++-- release-notes/5.2/5.2.0-preview2.md | 4 ++-- release-notes/5.2/5.2.0.md | 2 +- release-notes/5.2/README.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22dbd2b075..7d0f0afbfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,10 +19,10 @@ This update brings the below changes over the previous release: ### Changed -- Moved to new System.Data.SqlTypes APIs in **.NET 7** and **.NET 8**. [1934](https://github.com/dotnet/SqlClient/pull/1934) and [#1981](https://github.com/dotnet/SqlClient/pull/1981) +- Moved to new System.Data.SqlTypes APIs in **.NET 7** and upper. [1934](https://github.com/dotnet/SqlClient/pull/1934) and [#1981](https://github.com/dotnet/SqlClient/pull/1981) - Changed **[UseOneSecFloorInTimeoutCalculationDuringLogin](https://learn.microsoft.com/sql/connect/ado-net/appcontext-switches#enable-a-minimum-timeout-during-login)** App Context switch default to **true** and extended its effect to .NET and .NET Standard. [#2012](https://github.com/dotnet/SqlClient/pull/2012) - Updated `Microsoft.Identity.Client` version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055) -- Code health improvements: [#1985](https://github.com/dotnet/SqlClient/pull/1985) +- Code health improvement: [#1985](https://github.com/dotnet/SqlClient/pull/1985) ## [Preview Release 5.2.0-preview1.23109.1] - 2023-04-20 diff --git a/release-notes/5.2/5.2.0-preview2.md b/release-notes/5.2/5.2.0-preview2.md index 5798ce2b1c..0244e4e479 100644 --- a/release-notes/5.2/5.2.0-preview2.md +++ b/release-notes/5.2/5.2.0-preview2.md @@ -15,10 +15,10 @@ This update brings the below changes over the previous release: ### Changed -- Moved to new System.Data.SqlTypes APIs in **.NET 7** and **.NET 8**. [1934](https://github.com/dotnet/SqlClient/pull/1934) and [#1981](https://github.com/dotnet/SqlClient/pull/1981) +- Moved to new System.Data.SqlTypes APIs in **.NET 7** and upper. [1934](https://github.com/dotnet/SqlClient/pull/1934) and [#1981](https://github.com/dotnet/SqlClient/pull/1981) - Changed **[UseOneSecFloorInTimeoutCalculationDuringLogin](https://learn.microsoft.com/sql/connect/ado-net/appcontext-switches#enable-a-minimum-timeout-during-login)** App Context switch default to **true** and extended its effect to .NET and .NET Standard. [#2012](https://github.com/dotnet/SqlClient/pull/2012) - Updated `Microsoft.Identity.Client` version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055) -- Code health improvements: [#1985](https://github.com/dotnet/SqlClient/pull/1985) +- Code health improvement: [#1985](https://github.com/dotnet/SqlClient/pull/1985) ## Target Platform Support diff --git a/release-notes/5.2/5.2.0.md b/release-notes/5.2/5.2.0.md index 52db491caa..6c6c1db813 100644 --- a/release-notes/5.2/5.2.0.md +++ b/release-notes/5.2/5.2.0.md @@ -1,4 +1,4 @@ | Release Date | Version | Notes | | :-- | :-- | :--: | -| 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) | | 2023/06/08 | 5.2.0-preview2.x | [relese notes](5.2.0-preview2.md) | +| 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) | diff --git a/release-notes/5.2/README.md b/release-notes/5.2/README.md index 38fef5824b..c3e0064c90 100644 --- a/release-notes/5.2/README.md +++ b/release-notes/5.2/README.md @@ -4,5 +4,5 @@ The following Microsoft.Data.SqlClient 5.2 preview releases have been shipped: | Release Date | Version | Notes | | :-- | :-- | :--: | -| 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) | | 2023/06/08 | 5.2.0-preview2.x | [release notes](5.2.0-preview2.md) | +| 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) | From 9219aaa27faf3698fddba78a1ece86bf34347554 Mon Sep 17 00:00:00 2001 From: JRahnama Date: Thu, 8 Jun 2023 12:01:11 -0700 Subject: [PATCH 4/8] updating to exact version --- CHANGELOG.md | 2 +- release-notes/5.2/5.2.0-preview2.md | 2 +- release-notes/5.2/5.2.0.md | 2 +- release-notes/5.2/README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d0f0afbfd..d3f6508b1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ 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 5.2.0-preview2.x] - 2023-06-08 +## [Preview Release 5.2.0-preview2.23159.1] - 2023-06-08 This update brings the below changes over the previous release: diff --git a/release-notes/5.2/5.2.0-preview2.md b/release-notes/5.2/5.2.0-preview2.md index 0244e4e479..b52611d6fe 100644 --- a/release-notes/5.2/5.2.0-preview2.md +++ b/release-notes/5.2/5.2.0-preview2.md @@ -1,6 +1,6 @@ # Release Notes -## [Preview Release 5.2.0-preview2.x] - 2023-06-08 +## [Preview Release 5.2.0-preview2.23159.1] - 2023-06-08 This update brings the below changes over the previous release: diff --git a/release-notes/5.2/5.2.0.md b/release-notes/5.2/5.2.0.md index 6c6c1db813..6df24c30ce 100644 --- a/release-notes/5.2/5.2.0.md +++ b/release-notes/5.2/5.2.0.md @@ -1,4 +1,4 @@ | Release Date | Version | Notes | | :-- | :-- | :--: | -| 2023/06/08 | 5.2.0-preview2.x | [relese notes](5.2.0-preview2.md) | +| 2023/06/08 | 5.2.0-preview2.23159.1 | [relese notes](5.2.0-preview2.md) | | 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) | diff --git a/release-notes/5.2/README.md b/release-notes/5.2/README.md index c3e0064c90..81ca8236cd 100644 --- a/release-notes/5.2/README.md +++ b/release-notes/5.2/README.md @@ -4,5 +4,5 @@ The following Microsoft.Data.SqlClient 5.2 preview releases have been shipped: | Release Date | Version | Notes | | :-- | :-- | :--: | -| 2023/06/08 | 5.2.0-preview2.x | [release notes](5.2.0-preview2.md) | +| 2023/06/08 | 5.2.0-preview2.23159.1 | [release notes](5.2.0-preview2.md) | | 2023/04/20 | 5.2.0-preview1.23109.1 | [release notes](5.2.0-preview1.md) | From 36739bb13b3409f1e846a6640079173fcea52cbb Mon Sep 17 00:00:00 2001 From: JRahnama Date: Thu, 8 Jun 2023 13:32:10 -0700 Subject: [PATCH 5/8] Adding sample for RowsCopied64. --- release-notes/5.2/5.2.0-preview2.md | 36 ++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/release-notes/5.2/5.2.0-preview2.md b/release-notes/5.2/5.2.0-preview2.md index b52611d6fe..0e615d59de 100644 --- a/release-notes/5.2/5.2.0-preview2.md +++ b/release-notes/5.2/5.2.0-preview2.md @@ -6,7 +6,7 @@ This update brings the below changes over the previous release: ### Added -- Added new property `RowsCopied64` to `SqlBulkCopy`. [#2004](https://github.com/dotnet/SqlClient/pull/2004) +- Added new property `RowsCopied64` to `SqlBulkCopy`. [#2004](https://github.com/dotnet/SqlClient/pull/2004) [Read more](#added-new-property-rowscopied64-to-sqlbulkcopy) ### Fixed @@ -20,6 +20,40 @@ This update brings the below changes over the previous release: - Updated `Microsoft.Identity.Client` version from 4.47.2 to 4.53.0. [#2031](https://github.com/dotnet/SqlClient/pull/2031), [#2055](https://github.com/dotnet/SqlClient/pull/2055) - Code health improvement: [#1985](https://github.com/dotnet/SqlClient/pull/1985) +## New features over preview release v5.2.0-preview1 + +### Added new property `RowsCopied64` to SqlBulkCopy + +SqlBulkCopy has a new property `RowsCopied64` which supports `long` value types. + +**Note that the existing SqlBulkCopy.RowsCopied behaviour of going negative is still preserved for `int` types.** + +Example usage: + +```C# + + using (SqlConnection srcConn = new SqlConnection(srcConstr)) + using (SqlCommand srcCmd = new SqlCommand("select top 5 * from employees", srcConn)) + { + srcConn.Open(); + using (DbDataReader reader = srcCmd.ExecuteReader()) + { + using (SqlBulkCopy bulkcopy = new SqlBulkCopy(dstConn)) + { + bulkcopy.DestinationTableName = dstTable; + SqlBulkCopyColumnMappingCollection ColumnMappings = bulkcopy.ColumnMappings; + + ColumnMappings.Add("EmployeeID", "col1"); + ColumnMappings.Add("LastName", "col2"); + ColumnMappings.Add("FirstName", "col3"); + + bulkcopy.WriteToServer(reader); + long rowsCopied = bulkcopy.RowsCopied64; + } + } + } +``` + ## Target Platform Support - .NET Framework 4.6.2+ (Windows x86, Windows x64) From e2a43a0b355ff24aeb32e9be944554dbeb39f674 Mon Sep 17 00:00:00 2001 From: Javad Date: Thu, 8 Jun 2023 14:33:47 -0700 Subject: [PATCH 6/8] Apply suggestions from code review Co-authored-by: David Engel --- release-notes/5.2/5.2.0-preview2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-notes/5.2/5.2.0-preview2.md b/release-notes/5.2/5.2.0-preview2.md index 0e615d59de..1541709450 100644 --- a/release-notes/5.2/5.2.0-preview2.md +++ b/release-notes/5.2/5.2.0-preview2.md @@ -26,7 +26,7 @@ This update brings the below changes over the previous release: SqlBulkCopy has a new property `RowsCopied64` which supports `long` value types. -**Note that the existing SqlBulkCopy.RowsCopied behaviour of going negative is still preserved for `int` types.** +**Note that the existing `SqlBulkCopy.RowsCopied` behavior is unchanged. When the value exceeds `int.MaxValue`, `RowsCopied` can return a negative number.** Example usage: From cdfe59da3f1f74096362abf7611fdd3d47e94008 Mon Sep 17 00:00:00 2001 From: Javad Date: Thu, 8 Jun 2023 16:56:25 -0700 Subject: [PATCH 7/8] Apply suggestions from code review Co-authored-by: David Engel --- CHANGELOG.md | 2 +- release-notes/5.2/5.2.0-preview2.md | 44 ++++++++++++++--------------- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3f6508b1b..be67e16358 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ This update brings the below changes over the previous release: ### Fixed -- Fixed mixed synchronization issue in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) +- Fixed socket synchronization issue during connect in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) - Fixed issue with `SqlConnectionStringBuilder` property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018) ### Changed diff --git a/release-notes/5.2/5.2.0-preview2.md b/release-notes/5.2/5.2.0-preview2.md index 1541709450..0cf82ef594 100644 --- a/release-notes/5.2/5.2.0-preview2.md +++ b/release-notes/5.2/5.2.0-preview2.md @@ -10,7 +10,7 @@ This update brings the below changes over the previous release: ### Fixed -- Fixed mixed synchronization issue in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) +- Fixed socket synchronization issue during connect in managed SNI. [#1029](https://github.com/dotnet/SqlClient/pull/1029) - Fixed issue with `SqlConnectionStringBuilder` property indexer not supporting non-string values. [#2018](https://github.com/dotnet/SqlClient/pull/2018) ### Changed @@ -31,28 +31,26 @@ SqlBulkCopy has a new property `RowsCopied64` which supports `long` value types. Example usage: ```C# - - using (SqlConnection srcConn = new SqlConnection(srcConstr)) - using (SqlCommand srcCmd = new SqlCommand("select top 5 * from employees", srcConn)) - { - srcConn.Open(); - using (DbDataReader reader = srcCmd.ExecuteReader()) - { - using (SqlBulkCopy bulkcopy = new SqlBulkCopy(dstConn)) - { - bulkcopy.DestinationTableName = dstTable; - SqlBulkCopyColumnMappingCollection ColumnMappings = bulkcopy.ColumnMappings; - - ColumnMappings.Add("EmployeeID", "col1"); - ColumnMappings.Add("LastName", "col2"); - ColumnMappings.Add("FirstName", "col3"); - - bulkcopy.WriteToServer(reader); - long rowsCopied = bulkcopy.RowsCopied64; - } - } - } -``` + using (SqlConnection srcConn = new SqlConnection(srcConstr)) + using (SqlCommand srcCmd = new SqlCommand("select top 5 * from employees", srcConn)) + { + srcConn.Open(); + using (DbDataReader reader = srcCmd.ExecuteReader()) + { + using (SqlBulkCopy bulkcopy = new SqlBulkCopy(dstConn)) + { + bulkcopy.DestinationTableName = dstTable; + SqlBulkCopyColumnMappingCollection ColumnMappings = bulkcopy.ColumnMappings; + + ColumnMappings.Add("EmployeeID", "col1"); + ColumnMappings.Add("LastName", "col2"); + ColumnMappings.Add("FirstName", "col3"); + + bulkcopy.WriteToServer(reader); + long rowsCopied = bulkcopy.RowsCopied64; + } + } + } ## Target Platform Support From c4b80fb943e8520dc6c3d80681e880d9dcfa80e7 Mon Sep 17 00:00:00 2001 From: JRahnama Date: Thu, 8 Jun 2023 17:09:35 -0700 Subject: [PATCH 8/8] commit --- release-notes/5.2/5.2.0-preview2.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release-notes/5.2/5.2.0-preview2.md b/release-notes/5.2/5.2.0-preview2.md index 0cf82ef594..3cb604878d 100644 --- a/release-notes/5.2/5.2.0-preview2.md +++ b/release-notes/5.2/5.2.0-preview2.md @@ -51,6 +51,7 @@ Example usage: } } } +``` ## Target Platform Support