Skip to content

PoolBlockingUtilities incorrectly uses typeof(ApplicationIntent) instead of typeof(PoolBlockingPeriod) #3410

@daiplusplus

Description

@daiplusplus

Describe the bug

Just something I noticed while playing around with ApplicationIntent:

This line: https://github.com/dotnet/SqlClient/blob/e649a7c6a4ad20704f037cf6322f16300882feca/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/PoolBlockingUtilities.cs#L131C21-L131C95

throw ADP.InvalidEnumerationValue(typeof(ApplicationIntent), (int)eValue);

...should be this:

throw ADP.InvalidEnumerationValue(typeof(PoolBlockingPeriod), (int)eValue);

I did try to contrive a connection-string that would cause SqlConnection to reach the above throw but was ultimately unsuccessful, but I assume something internally within SqlClient can reach it.

To reproduce

N/A

Expected behavior

N/A

Further technical details

  • Microsoft.Data.SqlClient version: Current 6.0.2 - as well as the current main branch HEAD.
  • .NET target: N/A
  • SQL Server version: N/a
  • Operating system: N/A

Additional context

Metadata

Metadata

Assignees

Labels

P3Use for tagging low priority issues, impacts a single customer, and is not a critical/high issue.Triage Done ✔️Issues that are triaged by dev team and are in investigation.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions