Bug #6758 Problems with Connect/Net with MySQL Server Version 4.1.7
Submitted: 22 Nov 2004 23:55 Modified: 10 Dec 2004 20:15
Reporter: Nate Jones Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:1.0.2 OS:Windows (Windows XP, Windows 2000 Server)
Assigned to: Reggie Burnett CPU Architecture:Any

[22 Nov 2004 23:55] Nate Jones
Description:
I've found three problems so far.

1.  If you send a commandbehavior  of commandbehavior.singlerow (That's the only one I've tried) to the MySqlDataReader, the 2nd time that it's passed in (don't know why it's the 2nd time, just know that it is), when you try to Close() the Reader object, it just hangs trying to Close.

2.  When you are trying to return Multiple Resultsets, the 2nd (Again, don't know why it's the 2nd time) time you try to call the Reader.NextResult (I've just tried it with the Reader object), it hangs on the Reader.NextResult function...never returns from that function (It should return a boolean value)

3.  When you call an executereader on an sql query that doesn't return a result (can't find anything that matches the criteria), when you call the executereader function of the command object, it throws an exception that says you need to have a "valid connection selected, or make sure the connection is opened"

All three of these problems that we have found, have only surfaced since we switched our backend database from Version 4.0.18 to 4.1.7.
When we were using Version 4.0.18 of the MySql server, the problems never happened, but sinced moving to the 4.1.7 server, all these problems seem to be happening.  Don't know if you have different code the the connection/net runs depending on which server it detects upon connect or not, I haven't actually looked at the code for the connector/net much, but it appears that the problems are only present when the server is of the 4.1.x series.

How to repeat:
See the description above.  Just try to do any of those things more than one.  i.e. run the application that uses the above things, close the application, and start it again, and the problems will appear.

Suggested fix:
Don't know for sure.  Has to be something with the way the Connector/Net does things differently, depending on the version of the server it detects upon connection.
[10 Dec 2004 20:15] Reggie Burnett
Thank you for taking the time to report a problem.  Unfortunately
you are not using a current version of the product your reported a
problem with -- the problem might already be fixed. Please download
a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions,
please change the version on this bug report to the version you
tested and change the status back to "Open".  Again, thank you for
your continued support of MySQL.

Additional info:

Please see if you are still having problems with 1.0.3.  I am unable to reproduce this behavior on the current code base.  In fact, we have one test case that calls NextResult on a query that has like 7 queries on it.  It works fine on all dbs.