* Sort modifiers
* Replace all usages of DbConnectionFactory with SqlConnectionFactory let's see how this goes...
* Move member variables and constructor
* Move properties over
* Move pool clearing methods
* Move Create*Connection methods over
* Move CreateConnectionPoolGroupProviderInfo
* Move QueuePool*ForRelease
* Move TryGetConnection
* Move CreateReplaceConnectionContinuation
* Move TryGetConnectionCompletedContinuation
* Move GetConnectionPool
* Move GetConnectionPoolGroup
* Move GetMetaDataFactory and PruneConnectionPoolGroups
# Conflicts:
# src/Microsoft.Data.SqlClient/src/Microsoft/Data/ProviderBase/DbConnectionFactory.cs
* Move CompletedTask and merge FindConnectionOptions
(and cleanup CreateMetaDataFactory)
* Remove DbConnectionFactory
* Make timer period times based on milliseconds instead of seconds
* Fix reflection references to Db/SqlConnectionFactory
* Addressing called out expression bodies
* Address @mdaigle's comments
* Unseal class, temporarily, just for @mdaigle
* Remove _isTopLevelUdt and its usage
This always holds the constant value of true. Code paths which rely on it being false will never be called.
* Remove unused property and fields
IsNullable and _padBuffer were only referenced when _isTopLevelUdt was false.
_nullInstance was only referenced from IsNullable
* Remove _skipNormalize
This was always set to false
* Remove unused parameter from constructor
* Remove needless call to GetFormat
* Remove unused fields
These fields are assigned to, but never used
* Remove unused parameter
SqlConnection.GetBytes output a Format parameter which was never used at its call sites
* Remove incorrect comment
* Reset negotiateAuth if SNI doesn't work
This change also adds some book keeping to ensure we're only using the spn that has previously generated a context once one has been created.
* initialization only after success
* move serverSpn to be local
* Fix AzureSqlKeyCryptographer to be pure sync
* Fix Symmetric key cache design + Key vault cache
* Fix tests
* Add back multi-user cache scenario
* Add cache lock in global CEK cache to prevent concurrency issues.
* Touch-ups
* More changes to streamline getKey calls
* More updates
* - Addressed review comments.
* - Fixing tests that expect certain localized strings that have changed.
---------
Co-authored-by: Paul Medynski <31868385+paulmedynski@users.noreply.github.com>
* add clearing of data sizes when a multi-part result is returned
* remove asserts detecting overwrite of snapshot storage which are now no longer accurate
* remove empty statement block
---------
Co-authored-by: Wraith2 <Wraith2@gmaill.com>
* - Align SqlException Numbers across platforms
- Better capture error scenarios in TCP managed SNI.
- Fix logging bug in SqlClientEventSource.
- Change nativeError from uint to int
* - Removed duplicate SniErrorDetails object and aligned field names.
* - Added localized string for the new connection timed out exception.
* - Fixed tests sensitive to OS newlines.
---------
Co-authored-by: Paul Medynski <31868385+paulmedynski@users.noreply.github.com>
* Merge SqlBinary and SqlMoney helpers into SqlTypeWorkarounds
* Merge SqlGuid conversion
* Merge (/rewrite) SqlDecimal conversion
* Remove netfx file
* Fix bug in decimal conversion
* Rewrite SqlMoney to internal implementation to use member rather than method call
* UNIT TESTS :explosion: 🎉🆒
* Remove member variable access for SqlDecimal
* Add notes for documentation of internal methods
Replace SqlMoneyToLong code to use ToInternalRepresentation
* Converted Threads to long-running Tasks
The key advantage is that exceptions propagate properly.
If a thread throws an exception (as a result of a failed test assertion, or otherwise) then the test host crashes and must be restarted.
* Corrected the instantiation of the cancellation task - missing state parameter.
* Changes to TestSqlCommandCancel, eliminating timing-specific cancellation behaviour testing.
This should also allow the test to run on both netcore and netfx.
* Responding to code review.
* Removed two unnecessary iterations from DatabaseHelper.
* Added explanatory comments to ApiShould.
* Switched to using Task.WaitAll rather than waiting for each Task in sequence.
* Improve cancellation detection
Cancellation can trigger one of several different errors, resulting in a flakier test.
Also ensure that the query always takes more than 150ms, ensuring that a quick query execution doesn't cause the test to fail.
Finally, make sure that we try to read everything from the SqlDataReader.
* Correcting previous merge
* Add Feature Extension for User Agent
* resolve conflicts
* Add summary and review changes
* Add unit tests for WriteUserAgentFeatureRequest
* Update tests to avoid reflection
* Lazily merge the platform specific code into DbConnectionOptions.cs
* Remove SqlConnectionString.DEFAULT class and replace usages with DbConnectionStringDefaults
* Rename DbConnectionStringDefaults to match naming conventions
* Remove SqlConnectionString.KEY and replace with DbConnectionStringKeywords
* Rename DbConnectionStringKeywords to match naming conventions, remove dead OLEDB and ODBC keywords
* Remove SqlConnectionString.SYNONYMS and replace with DbConnectionStringSynonyms
* Rename DbConnectionStringSynonyms to match naming conventions
* Statically build dictionary of keyword mappings. This should be cleaner than the old version.
* Synonym comparison is supposed to be case-insensitive
* Fixing typos as per @paulmedynski's comments
* Account for MAX_DISPATCH_LATENCY in XEvents tests
XEvents are asynchronous, and are written to the target within MAX_DISPATCH_LATENCY seconds. We therefore need to wait that long before querying the target.
* Filter XEvent session by client_connection_id
* User Story 37737: Prepare release notes for v6.1-preview2
- Added release notes for 6.1.0-preview2.
- Tidied up some previous release notes.
* User Story 37737: Prepare release notes for v6.1-preview2
- Updated release notes to call out our major additions with impact.
* User Story 37737: Prepare release notes for v6.1-preview2
- Addressed review feedback.
* Update version number
---------
Co-authored-by: Cheena Malhotra <cmalhotra@microsoft.com>
* - Added netstandard2.0 to the list of expected runtimes when validating an Official MDS package.
- Added comments to Versions.props warning of fragile validation logic.
- Improved comments in the validation pipeline job.
* Addressed Copilot suggestion.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Stage 1: _errors and _warnings are always null, so HasMessages will always be false
* Initial cleanup of ProcessMessages and ProcessMessagesAndThrow
* Stub now-empty methods
* Remove ProcessMessagesAndThrow (and all references.)
* Remove first pass of SmiEventSink_Default parameters
* Complete removal of SmiEventSink_Default from setters
* Remove SmiEventSink_Default from SmiGettersStream, follow through
* Remove circular references from GetValue and GetSqlValue200
* Remove unused SmiEventSink_Default parameters, follow through
* Remove lingering SmiEventSink_Default file
* Clean up _recordBuffer assignment
* Support vector datatype with SqlVector<T>
* Update xml documentation for APIs and address review comments
* Remove ToArray() and change ToString() to internal GetString()
* Delete SqlDataReaderSmi
* Delete SqlInternalConnectionSmi
* Delete eventsink from command class, and code that called it (that was no longer being used)
* Delete netfx specific ValueUtilsSmi
* Remove the rest of the (now) unused classes for SMI
* Make static classes ... static
* Remove dead methods
* Remove dead properties and fields
* Remove SqlSequentialStreamSmi and SqlSequentialTextReaderSmi since they are no longer used
* Remove parent from SmiEventSink_Default - which I think means all the methods throw now ...
* Remove obsolete code from SmiRecordBuffer
* Remove dead code from SmiEventSink for netfx
* Remove ITypedGetters/ITypedSetters
* Remove unused sink parameters
* Remove the now empty netfx SmiEventSink_Default and SmiEventSink
* Remove tests from SqlMetaDataTest that exercised dead code
* use the same style of #if in SmiEventSink
* Merge SqlConnectionFactory.AssemblyLoadContext into netcore SqlConnectionFactory class
Align netcore and netfx versions to make merge really easy
* Create merge file
* Resolving most of the merges, except a few that I need some help on.
* Adding more stubs :)
* Resolve remaining merge conflicts
* Use the common file in both projects
* Applying the change that I said I was going to apply in the last PR
* PR Comments, Round 1
* Make merge file for SqlBulkCopy - wowee, these files are pretty close together already!
* Remove old SqlBulkCopy files and point projects to common project one
* Addressing the easy differences
* Fix broken documentation links
* Stub out more methods/classes to eliminate most of the errors in SqlBulkCopy
* Resolve the rest of the conflicts
* Fix mistake in conflict resolution
* Addressing PR feedback
* Oh hey, InOutOfProcHelper.InProc always returns false! Let's propagate that false everywhere it was being used to determine what other branches of code can be deleted
* Remove usages of IsInProc that were always false
* Remove dead code in SmiContextFactory and distill properties down to exceptions they will always throw b/c _smiLink will always be null
* Propagate always thrown exceptions, remove that code from SmiContextFactory
* Remove SmiVersion that was hardcoded to 2008. Propagate 2008 to all usages of the property
It can continue to be propagated if we find out the version is always the same...
* Remove SmiContextFactory.LatestVersion by replacing usage with 2008 and propagate that forward, allowing us to remove MetadataUtilsSmi.IsValidForSmiVersion and a block of code in SqlDataRecord
* Propagate 2008 version, which eliminates a bunch of conditions, eliminating the last uses of SmiVersion2008
* Delete the now unused SmiContextFactory class
* Remove _smiRequestContext from SqlCommand since it is always assigned `null`, replacing usages of it with `null`
* Remove context parameter from ValueUtilsSmi.GetOutputParameterV3Smi, since it is always passed to itself
* Remove context parameter from ValueUtilsSmi.GetOutputParameterV200Smi, since it is always passed to itself and is always null
* Delete ExecuteToPipe since it is no longer being used.
* Remove _recordContext from SqlDataRecord since it is always null, propagate null to all usages of it
* SqlInternalConnectionSmi.InternalContext is always null, deleting and propagating null to all usages of it
Also removing SqlInternalConnectionSmi.SmiConnection since it's never used.
* Removing SqlContext usages from ValueUtilsSmi - it was always null, so it can be eliminated
* Removing last references to SqlContext in SqlInternalConnectionSmi
* Delete SmiContext
* @edwardneal is a hero, deleting another bundle of unused code.
* Move DbConnectionString to the common project
# Conflicts:
# src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj
* Remove DbConnectionString.KEY
* Rename DbConnectionString to match naming conventions
* Revert mistake in SqlConnectionFactory
* Make pool provider info creation methods abstract
Make pool provider info arguments in *ConnectionFactory methods strongly typed
* Remove SqlConnectionString.ContextConnection - and all direct usages of it
* Remove SqlConnection.UsesContextConnection - and all direct usages of it
* Removing SqlConnection.IsContextConnection and all direct usages
* Removing SqlConnectionFactory.GetContextConnection - it was no longer being used.
* Removing SmiContext.GetContextValue and SmiContext.SetContextValue - they are no longer being used
* Delete SqlCommand.RunExecuteNonQuerySmi - it is no longer being used
* Remove SqlCommand.RunExecuteReaderSmi - it is no longer being used.
* Remove SqlCommand.SetUpSmiRequest - is no longer being used