Bug #15834 | DataReader already exists? | ||
---|---|---|---|
Submitted: | 17 Dec 2005 23:12 | Modified: | 23 Mar 2006 18:54 |
Reporter: | Aaron Freeman | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 1.0.7 | OS: | Windows (Windows XP Professional) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[17 Dec 2005 23:12]
Aaron Freeman
[18 Dec 2005 19:06]
Vasily Kishkin
Thank for the bug report. I was able to reproduce the bug. My test case is attached.
[18 Dec 2005 19:07]
Vasily Kishkin
Test case
Attachment: 15834.zip (application/force-download, text), 5.37 KiB.
[21 Jan 2006 22:26]
Peter Vyvey
Hello, I solved/worked around this bug by changing the following method in Driver.cs and recompiling the MySql connector 1.0.7: public void ReportWarnings() { ArrayList errors = new ArrayList(); MySqlConnection _warningConnection = new MySqlConnection(this.connectionString.GetConnectionString(true)); MySqlCommand cmd = new MySqlCommand("SHOW WARNINGS", _warningConnection); MySqlDataReader reader = null; try { _warningConnection.Open(); reader = cmd.ExecuteReader(); while (reader.Read()) { errors.Add(new MySqlError(reader.GetString(0), reader.GetInt32(1), reader.GetString(2))); } reader.Close(); hasWarnings = false; // MySQL resets warnings before each statement, so a batch could indicate // warnings when there aren't any if (errors.Count == 0) return; MySqlInfoMessageEventArgs args = new MySqlInfoMessageEventArgs(); args.errors = (MySqlError[])errors.ToArray(typeof(MySqlError)); if (connection != null) connection.OnInfoMessage( args ); } catch (Exception) { throw; } finally { if (reader != null) reader.Close(); if (_warningConnection.State == System.Data.ConnectionState.Open) _warningConnection.Close(); } } Regards, Peter Vyvey - http://www.chiliware.be
[26 Jan 2006 8:15]
reiner wein
This bug appears in my application, too. My workaround: de-connecting and re-connecting to mySQL Will it be fixed in the next version of Connector/Net and when will it be available ? Thanks !
[23 Feb 2006 18:54]
Reggie Burnett
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to 'Open'. Thank you for your interest in MySQL. Additional info: Aaron I'm unable to reproduce either using your code or the test case from Vasiliy. I tried with the table empty and it worked. I tried with a row in the table and get a server error indicating that the result inside the sproc resulted in more than one row. Can you attach to this bug report a test case with create table and create procedure scripts that show the problem? Reggie
[24 Mar 2006 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".