Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to read all compressed data in .NET 6.0 #1120

Closed
bgrainger opened this issue Jan 24, 2022 · 2 comments
Closed

Fails to read all compressed data in .NET 6.0 #1120

bgrainger opened this issue Jan 24, 2022 · 2 comments

Comments

@bgrainger
Copy link
Member

From PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#1607.

Per https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/partial-byte-reads-in-streams, under .NET 6.0 applications should repeatedly call Stream.Read until all data is read. MySqlConnector does not do this, leading to command timeouts.

@bgrainger
Copy link
Member Author

Running the existing compression tests under .NET 6.0 (3fdffdc) hasn't failed yet, but looks like it's going to time out (https://dev.azure.com/mysqlnet/MySqlConnector/_build/results?buildId=2055&view=results).

@bgrainger
Copy link
Member Author

bgrainger commented Jan 25, 2022

Fixed in 2.1.3.

okramarenko added a commit to memsql/SingleStoreNETConnector that referenced this issue Mar 22, 2023
Summary:
This diff grabs changes from original connector that were made in 2.1.3, 2.1.4 and 2.1.5 releases:
- Add better FormatException message for Guid types
- Update StyleCop version
- Update Microsoft.NET.Test.Sdk to 17.0.0
- Loop to read all data when decompressing. Fixes mysql-net#1120
- Eliminate unnecessary allocations for constant payloads
- Fix extra indentation (ConnectionTests.cs, DataAdapterTests.cs, SslTests.cs)
- Speed up inserts with MySqlDataAdapter. Fixes mysql-net#1124
- Include "special" bytes in blob insert test to ensure that these values are escaped properly

Test Plan: https://app.circleci.com/pipelines/github/memsql/SingleStoreNETConnector/239/workflows/1facf76f-076a-47d5-86d6-2cb4d8a887a9

Reviewers: pmishchenko-ua

Reviewed By: pmishchenko-ua

Subscribers: engineering-list

JIRA Issues: PLAT-6408

Differential Revision: https://grizzly.internal.memcompute.com/D61592
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant