Skip to content

Updating my project to Connector 2.3.x break my MySqlDataReader's results in some strange case. #1401

Answered by RioMcBoo
RioMcBoo asked this question in Q&A
Discussion options

You must be logged in to vote

https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql-server-connection-pooling

The problem was about pool doesn't create a new reader after 2.3.х because it doesn't close current connection since now. (And it seems that now, being empty, the Reader itself closes and, together with the connection, passes into other hands without warning.)

And the stupid idea (maybe not) was using reader.Read() at creation reader's wrapper without any processing callback's bool value.

So I added in reader's wrapper the varification of this boolean value, and made it close the reader, and made link of it to be equal null.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@RioMcBoo
Comment options

Comment options

You must be logged in to vote
2 replies
@bgrainger
Comment options

@RioMcBoo
Comment options

Comment options

You must be logged in to vote
1 reply
@RioMcBoo
Comment options

Answer selected by RioMcBoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants