| Bug #52769 | Exception not logged in MySqlConnection.Abort() | ||
|---|---|---|---|
| Submitted: | 12 Apr 2010 16:14 | Modified: | 22 Apr 2010 16:16 |
| Reporter: | Michael Pritchard | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S3 (Non-critical) |
| Version: | 6.2.3, trunk | OS: | Windows |
| Assigned to: | Reggie Burnett | CPU Architecture: | Any |
[13 Apr 2010 6:27]
Tonci Grgin
Hi Michael and thanks for spotting this. Verified as described by looking into sources (trunk, Connection.cs, ~Ln 569).
[16 Apr 2010 0:41]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/105786 802 Reggie Burnett 2010-04-15 - Added trace message in exception blog in MySqlConnection.Abort() method (bug #52769)
[16 Apr 2010 0:47]
Reggie Burnett
fixed in 6.0.6, 6.1.4, 6.2.4, and 6.3.2
[22 Apr 2010 16:16]
Tony Bedford
An entry has been added to the 6.0.6, 6.1.4, 6.2.4, and 6.3.2 changelogs: In MySQL Connector/NET, the MySqlConnection.Abort() method contained a try...catch construct, with an empty catch block. This meant that any exception generated at this point would not be caught.

Description: In the MySqlConnection.Abort() method there is a try...catch with an empty catch block. I believe that should an exception occur in here it should at least be logged using the MySqlTrace class, like is used elsewhere, rather than being ignored altogether. How to repeat: If an exception occurs in here (don't know how to create one) no-one will know about it. Suggested fix: replace with something along the lines of: catch(Exception ex){ MySqlTrace.LogWarning(ServerThread, string.Concat("Error occurred aborting the connection. Exception was: ", ex.Message)); }