Skip to content

ArgumentNullException when reading empty/null PLP strings with new async behavior - #3884

Draft
SimonCropp wants to merge 7 commits into
dotnet:mainfrom
SimonCropp:ArgumentNullException-when-reading-empty/null-PLP-strings-with-new-async-behavior
Draft

ArgumentNullException when reading empty/null PLP strings with new async behavior#3884
SimonCropp wants to merge 7 commits into
dotnet:mainfrom
SimonCropp:ArgumentNullException-when-reading-empty/null-PLP-strings-with-new-async-behavior

Conversation

@SimonCropp

Copy link
Copy Markdown
Contributor

attempt to replicate #593 (comment)

Copilot AI review requested due to automatic review settings January 12, 2026 23:14
@SimonCropp
SimonCropp requested a review from a team as a code owner January 12, 2026 23:14
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jan 12, 2026
@SimonCropp
SimonCropp marked this pull request as draft January 12, 2026 23:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a test case to verify that reading empty and null PLP (Partially Length-Prefixed) strings asynchronously does not throw an ArgumentNullException when using the new async behavior. The test is a regression test for issue #593, which originally reported severe performance problems when reading large binary data asynchronously.

Changes:

  • Added a new async test ReadEmptyAndNullPlpStringsAsyncWithNewBehavior that validates reading NULL and empty string values from VARCHAR(MAX), NVARCHAR(MAX), and TEXT columns
  • The test disables compatibility mode to use the new async behavior via the UseCompatibilityAsyncBehaviour switch

@cheenamalhotra cheenamalhotra moved this from To triage to In progress in SqlClient Board Jan 13, 2026
@cheenamalhotra cheenamalhotra added the Area\Tests Issues that are targeted to tests or test projects label Jan 13, 2026
@SimonCropp

Copy link
Copy Markdown
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

@SimonCropp

Copy link
Copy Markdown
Contributor Author

@cheenamalhotra where should i see the PRs i request from copilot?

@ErikEJ

ErikEJ commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

@SimonCropp I doubt you can control Copilot in this repo - only in your own fork

@SimonCropp

Copy link
Copy Markdown
Contributor Author

@ErikEJ so isnt that a bug in copilot, that it is offering to submit PRs that it can actually do?

@Wraith2

Wraith2 commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

If you get a test that works quickly and reliably enough for CI use do you want me to include it in #3872 or do you want to include my change in this PR?, either is fine.

Copilot AI review requested due to automatic review settings March 5, 2026 00:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

@paulmedynski

Copy link
Copy Markdown
Contributor

/azp run

@paulmedynski paulmedynski self-assigned this Mar 5, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

paulmedynski
paulmedynski previously approved these changes Mar 5, 2026
…on-when-reading-empty/null-PLP-strings-with-new-async-behavior
  1. Table name bracket-quoting: All three SQL statements (CREATE TABLE, INSERT INTO, SELECT FROM) now use [{tableName}]
   instead of {tableName}, consistent with the rest of the file.
  2. Comment accuracy: Updated the comment from "PLP string columns" to "large string columns (VARCHAR(MAX),
  NVARCHAR(MAX) are PLP types; TEXT is a deprecated LOB type)" to accurately reflect that TEXT is not a PLP type.
Copilot AI review requested due to automatic review settings April 12, 2026 00:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Tests Issues that are targeted to tests or test projects

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

6 participants