Skip to content

Commit a935c62

Browse files
committed
Merge branch 'main' into tests/manual-tests-certificate-generation
2 parents d2ca8e5 + 3d652d4 commit a935c62

File tree

111 files changed

+5526
-4299
lines changed

Some content is hidden

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

111 files changed

+5526
-4299
lines changed

CHANGELOG.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66

77
# Release Notes
88

9+
## [Stable release 6.0.1] - 2025-01-23
10+
11+
This update brings the below changes over the previous release:
12+
13+
### Fixed
14+
15+
- Fixed reference assembly definitions for SqlClientDiagnostic APIs [#3097](https://github.com/dotnet/SqlClient/pull/3097)
16+
- Fixed issue with down-level SSL/TLS version warnings [#3126](https://github.com/dotnet/SqlClient/pull/3126)
17+
18+
### Changed
19+
20+
- Dependency changes
21+
- Updated SNI dependency `Microsoft.Data.SqlClient.SNI` and `Microsoft.Data.SqlClient.SNI.runtime` to `6.0.2` [#3116](https://github.com/dotnet/SqlClient/pull/3116) [#3117](https://github.com/dotnet/SqlClient/pull/3117)
22+
23+
## [Stable release 6.0.0] - 2024-12-09
24+
25+
_No changes since the last preview release_
26+
927
## [Preview Release 6.0.0-preview3.24332.3] - 2024-11-27
1028

1129
This update brings the below changes over the previous release:
1230

13-
## Breaking Changes
31+
### Breaking Changes
1432
- Dropped support for .NET 6 [#2927](https://github.com/dotnet/SqlClient/pull/2927)
1533
- Removed SQL 2000 client-side debugging support for .NET Framework [#2981](https://github.com/dotnet/SqlClient/pull/2981), [#2940](https://github.com/dotnet/SqlClient/pull/2940)
1634

@@ -73,7 +91,7 @@ This update brings the below changes over the previous release:
7391
### Added
7492

7593
- Added `TokenCredential` object to take advantage of token caching in `ActiveDirectoryAuthenticationProvider`. [#2380](https://github.com/dotnet/SqlClient/pull/2380)
76-
- Added `DateOnly` and `TimeOnly` support to `DataTable` as a structured parameter. [#2258](https://github.com/dotnet/SqlClient/pull/2258)
94+
- Added support for using `DateOnly` and `TimeOnly` in `DataTable` and `SqlDataRecord` structured parameters. [#2258](https://github.com/dotnet/SqlClient/pull/2258)
7795
- Added `Microsoft.Data.SqlClient.Diagnostics.SqlClientDiagnostic` type in .NET. [#2226](https://github.com/dotnet/SqlClient/pull/2226)
7896
- Added scope trace for `GenerateSspiClientContext`. [#2497](https://github.com/dotnet/SqlClient/pull/2497), [#2725](https://github.com/dotnet/SqlClient/pull/2725)
7997

@@ -89,7 +107,7 @@ This update brings the below changes over the previous release:
89107
- Fixed clone of `SqlConnection` to include `AccessTokenCallback`. [#2525](https://github.com/dotnet/SqlClient/pull/2525)
90108
- Fixed issue with `DateTimeOffset` in table-valued parameters, which was introduced in 5.2. [#2453](https://github.com/dotnet/SqlClient/pull/2453)
91109
- Fixed `ArgumentNullException` on `SqlDataRecord.GetValue` when using user-defined data type on .NET. [#2448](https://github.com/dotnet/SqlClient/pull/2448)
92-
- Fixed `SqlBuffer` and `SqlGuild` when it's null. [#2310](https://github.com/dotnet/SqlClient/pull/2310)
110+
- Fixed `SqlBuffer` and `SqlGuid` when it's null. [#2310](https://github.com/dotnet/SqlClient/pull/2310)
93111
- Fixed `SqlBulkCopy.WriteToServer` state in a consecutive calls. [#2375](https://github.com/dotnet/SqlClient/pull/2375)
94112
- Fixed null reference exception with `SqlConnection.FireInfoMessageEventOnUserErrors` after introducing the batch command. [#2399](https://github.com/dotnet/SqlClient/pull/2399)
95113

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Microsoft.Data.SqlClient is a .NET data provider for [Microsoft SQL Server]([url
1111
The Microsoft.Data.SqlClient package supports the following environments:
1212

1313
- .NET Framework 4.6.2+
14-
- .NET 8.0
14+
- .NET 8.0+
1515

1616
## Download
1717

@@ -40,15 +40,17 @@ When targeting .NET on Windows, a package reference to [Microsoft.Data.SqlClient
4040
Special thanks to everyone who has contributed to the project.
4141
We thank you for your continuous support in improving the SqlClient library!
4242

43-
- Wraith ([@Wraith2](https://github.com/Wraith2))
43+
- Edward Neal ([@edwardneal](https://github.com/edwardneal))
4444
- Erik Ejlskov Jensen ([@ErikEJ](https://github.com/ErikEJ))
45-
- Simon Cropp ([@SimonCropp](https://github.com/SimonCropp))
46-
- Stefán Jökull Sigurðarson ([@stebet](https://github.com/stebet))
45+
- Michel Zehnder ([@MichelZ](https://github.com/MichelZ))
4746
- Shay Rojansky ([@roji](https://github.com/roji))
48-
- Stephen Toub ([@stephentoub](https://github.com/stephentoub))
49-
- Rasmus Melchior Jacobsen ([@rmja](https://github.com/rmja))
5047
- Phillip Haydon ([@phillip-haydon](https://github.com/phillip-haydon))
48+
- Rasmus Melchior Jacobsen ([@rmja](https://github.com/rmja))
5149
- Robin Sue ([@Suchiman](https://github.com/Suchiman))
50+
- Simon Cropp ([@SimonCropp](https://github.com/SimonCropp))
51+
- Stefán Jökull Sigurðarson ([@stebet](https://github.com/stebet))
52+
- Stephen Toub ([@stephentoub](https://github.com/stephentoub))
53+
- Wraith ([@Wraith2](https://github.com/Wraith2))
5254

5355
Up-to-date list of contributors: [Contributor Insights](https://github.com/dotnet/SqlClient/graphs/contributors)
5456

doc/snippets/Microsoft.Data.SqlClient/SqlClientDiagnostic.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<returns>
3535
The element at the specified index in the read-only list.
3636
</returns>
37-
<exception cref="IndexOutOfRangeException" />
37+
<exception cref="System.IndexOutOfRangeException" />
3838
</Item1>
3939
<Count>
4040
<summary>

doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,11 @@
12461246
No conversions are performed; therefore, the data retrieved must already be a 64-bit signed integer, or an exception is generated.
12471247
</remarks>
12481248
</GetSqlInt64>
1249+
<GetSqlJson>
1250+
<param name="i"></param>
1251+
<summary>Gets the value of the specified column as a <see cref="T:Microsoft.Data.SqlTypes.SqlJson"/>.</summary>
1252+
<returns>A <see cref="T:Microsoft.Data.SqlTypes.SqlJson"/> object representing the column at the given ordinal.</returns>
1253+
</GetSqlJson>
12491254
<GetSqlMoney>
12501255
<param name="i">
12511256
The zero-based column ordinal.

doc/snippets/Microsoft.Data.SqlTypes/SqlJson.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,5 @@
2424
<Value>
2525
<summary>Gets the string representation of the Json content of this <see cref="SqlJson" /> instance.</summary>
2626
</Value>
27-
<GetSqlJson>
28-
<param name="i"></param>
29-
<summary>Retrieves the column at ordinal as a <see cref="SqlJson"/>.</summary>
30-
<returns>A <see cref="SqlJson"/> object representing the column at the given ordinal.</returns>
31-
</GetSqlJson>
3227
</members>
3328
</docs>

eng/pipelines/common/templates/jobs/ci-run-tests-job.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,22 @@ jobs:
9292
- ${{ if ne(parameters.prebuildSteps, '') }}:
9393
- ${{ parameters.prebuildSteps }} # extra steps to run before the build like downloading sni and the required configuration
9494

95+
- powershell: |
96+
$guid = [guid]::NewGuid().ToString()
97+
Write-Host "##vso[task.setvariable variable=password;issecret=true]$guid"
98+
displayName: 'Generate Password'
99+
100+
- powershell: |
101+
Write-Host "Password: $(password)" # prints *** to logs when set
102+
103+
$variableValue = "$(password)"
104+
if (-not [string]::IsNullOrEmpty($variableValue)) {
105+
Write-Output "The password exists with a value."
106+
} else {
107+
Write-Output "The password does not exist or is empty."
108+
}
109+
displayName: 'Verify Password'
110+
95111
- ${{ if ne(parameters.configProperties, '{}') }}:
96112
- template: ../steps/update-config-file-step.yml@self # update config.json file
97113
parameters:
@@ -178,8 +194,6 @@ jobs:
178194
user: ${{ parameters.configProperties.user }}
179195
${{ if parameters.configProperties.saUser }}:
180196
saUser: ${{ parameters.configProperties.saUser }}
181-
${{ if parameters.configProperties.password }}:
182-
password: ${{ parameters.configProperties.password }}
183197
${{ if parameters.configProperties.SQLRootPath }}:
184198
SQLRootPath: ${{ parameters.configProperties.SQLRootPath }}
185199
${{ if parameters.configProperties.x64AliasRegistryPath }}:

eng/pipelines/common/templates/steps/configure-sql-server-linux-step.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ parameters:
77
- name: password
88
type: string
99
default: $(password)
10-
10+
1111
- name: condition
1212
type: string
1313
default: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
@@ -18,11 +18,9 @@ steps:
1818
sudo systemctl stop mssql-server
1919
2020
# Password for the SA user (required)
21+
2122
MSSQL_SA_PW=${{parameters.password }}
22-
if [ "$MSSQL_SA_PW" = "generated_placeholder" ]; then
23-
exit 0
24-
fi
25-
23+
2624
# Product ID of the version of SQL server you're installing
2725
# Must be evaluation, developer, express, web, standard, enterprise, or your 25 digit product key
2826
MSSQL_PID='enterprise'
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#################################################################################
2+
# Licensed to the .NET Foundation under one or more agreements. #
3+
# The .NET Foundation licenses this file to you under the MIT license. #
4+
# See the LICENSE file in the project root for more information. #
5+
#################################################################################
6+
parameters:
7+
- name: password
8+
type: string
9+
default: $(password)
10+
11+
- name: condition
12+
type: string
13+
default: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
14+
15+
steps:
16+
# Linux only steps
17+
- bash: |
18+
# The "user" pipeline variable conflicts with homebrew, causing errors during install. Set it back to the pipeline user.
19+
USER=`whoami`
20+
SQLCMD_ERRORS=$(Agent.TempDirectory)/sqlcmd_err.log
21+
echo $SQLCMD_ERRORS
22+
23+
brew install colima
24+
brew install --cask docker
25+
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
26+
brew update
27+
HOMEBREW_ACCEPT_EULA=Y brew install mssql-tools18
28+
colima start --arch x86_64
29+
docker --version
30+
docker pull mcr.microsoft.com/mssql/server:2022-latest
31+
32+
# Password for the SA user (required)
33+
MSSQL_SA_PW=${{parameters.password }}
34+
35+
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$MSSQL_SA_PW" -p 1433:1433 -p 1434:1434 --name sql1 --hostname sql1 -d mcr.microsoft.com/mssql/server:2022-latest
36+
37+
sleep 5
38+
39+
docker ps -a
40+
41+
# Connect to server and get the version:
42+
counter=1
43+
errstatus=1
44+
while [ $counter -le 20 ] && [ $errstatus = 1 ]
45+
do
46+
echo Waiting for SQL Server to start...
47+
sleep 3
48+
sqlcmd -S 0.0.0.0 -No -U sa -P $MSSQL_SA_PW -Q "SELECT @@VERSION" 2>$SQLCMD_ERRORS
49+
errstatus=$?
50+
((counter++))
51+
done
52+
53+
# Display error if connection failed:
54+
if [ $errstatus = 1 ]
55+
then
56+
echo Cannot connect to SQL Server, installation aborted
57+
cat $SQLCMD_ERRORS
58+
rm -f $SQLCMD_ERRORS
59+
exit $errstatus
60+
else
61+
rm -f $SQLCMD_ERRORS
62+
fi
63+
64+
echo "Use sqlcmd to show which IP addresses are being listened on..."
65+
echo 0.0.0.0
66+
sqlcmd -S 0.0.0.0 -No -U sa -P $MSSQL_SA_PW -Q "SELECT @@VERSION" -l 2
67+
echo 127.0.0.1
68+
sqlcmd -S 127.0.0.1 -No -U sa -P $MSSQL_SA_PW -Q "SELECT @@VERSION" -l 2
69+
echo ::1
70+
sqlcmd -S ::1 -No -U sa -P $MSSQL_SA_PW -Q "SELECT @@VERSION" -l 2
71+
echo localhost
72+
sqlcmd -S localhost -No -U sa -P $MSSQL_SA_PW -Q "SELECT @@VERSION" -l 2
73+
echo "(sqlcmd default / not specified)"
74+
sqlcmd -No -U sa -P $MSSQL_SA_PW -Q "SELECT @@VERSION" -l 2
75+
76+
echo "Configuring Dedicated Administer Connections to allow remote connections..."
77+
sqlcmd -S 0.0.0.0 -No -U sa -P $MSSQL_SA_PW -Q "sp_configure 'remote admin connections', 1; RECONFIGURE;"
78+
if [ $? = 1 ]
79+
then
80+
echo "Error configuring DAC for remote access."
81+
exit $errstatus
82+
else
83+
echo "Configuration complete."
84+
fi
85+
86+
displayName: 'Configure SQL Server [macOS]'
87+
condition: ${{parameters.condition }}

eng/pipelines/common/templates/steps/configure-sql-server-step.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ steps:
9393
parameters:
9494
password: ${{parameters.password}}
9595

96+
- ${{ elseif eq(parameters.operatingSystem, 'Mac') }}:
97+
# macOS only steps
98+
- template: configure-sql-server-macos-step.yml@self
99+
parameters:
100+
password: ${{parameters.password}}
101+
96102
# Common steps
97103
- task: DotNetCoreCLI@2
98104
displayName: 'Build Ext Utilities'

eng/pipelines/common/templates/steps/configure-sql-server-win-step.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,7 @@ steps:
101101

102102
- powershell: |
103103
$password = "${{parameters.password }}"
104-
if ( "generated_placeholder" -eq $password )
105-
{
106-
$password = [guid]::NewGuid().ToString()
107-
}
108-
104+
109105
$machineName = $env:COMPUTERNAME
110106
111107
if ("${{parameters.instanceName }}" -ne "MSSQLSERVER"){

0 commit comments

Comments
 (0)