Bug #9237 | MySqlDataReader.AffectedRecords not set to -1 | ||
---|---|---|---|
Submitted: | 17 Mar 2005 0:17 | Modified: | 22 Mar 2005 3:50 |
Reporter: | John Boucher | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | MySQL Connector Net 1.0.4 | OS: | Windows (WinXP Pro SP2) |
Assigned to: | Reggie Burnett | CPU Architecture: | Any |
[17 Mar 2005 0:17]
John Boucher
[17 Mar 2005 16:22]
John Boucher
OK, in command.cs, in GetNextResultSet, I commented out: // if (updateCount == -1) // updateCount = 0; and it's OK for selects, but I'm having a problem with an update, which may be my problem, so I'm still looking at it.
[17 Mar 2005 16:43]
John Boucher
OK, undo that, and just a little lower do: if (result.IsResultSet) { lastResult = result; Add>> updateCount = -1 ; return result; }
[17 Mar 2005 18:18]
John Boucher
That seems to have done it, but it could be neater.
[22 Mar 2005 3:50]
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 Additional info: John You were close but you have to keep in mind that RecordsAffected is for the entire batch. So, setting it to -1 if lastResult is a resultset will lose data. I've checked in a fix for this. THanks for the bug report. Reggie