Bug #19936 DataReader already open exception
Submitted: 19 May 2006 10:15 Modified: 22 May 2006 21:15
Reporter: Luke Quinane Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:1.0.7 OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any

[19 May 2006 10:15] Luke Quinane
Description:
When trying to fill a dataset from a stored procedure an exception is thrown if the select returns no rows.

How to repeat:
See attached file.

Suggested fix:
The exception can be avoided by wrapping the select statement in an if-block that checks for results.

E.g.

IF EXISTS (SELECT ...) THEN
SELECT ...
END IF;
[19 May 2006 10:15] Luke Quinane
Example program and SQL.

Attachment: SpTest.zip (application/zip, text), 3.46 KiB.

[19 May 2006 10:15] Luke Quinane
Example program and SQL.

Attachment: SpTest.zip (application/zip, text), 3.46 KiB.

[19 May 2006 13:09] Tonci Grgin
Luke, thanks for your complete bug report. I was able to verify it as reported on MySQL server 5.0.22bk and WinXP SP2.
[22 May 2006 21:15] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html
[22 May 2006 21:22] Reggie Burnett
Fixed in 1.0.8