| Bug #85215 | Broken connection will be enqueued into the idle pool which may cause problems | ||
|---|---|---|---|
| Submitted: | 28 Feb 2017 3:25 | Modified: | 29 Sep 19:19 |
| Reporter: | Yenan Wang | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | Connector / NET | Severity: | S2 (Serious) |
| Version: | 6.9.9 and below | OS: | Windows |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
| Tags: | broken connection, charset issue | ||
[28 Feb 2017 3:25]
Yenan Wang
[28 Feb 2017 7:12]
Chiranjeevi Battula
Hello Yenan Wang, Thank you for the bug report. Could you please provide repeatable test case(exact steps/sample project, sample connection details etc. - please make it as private if you prefer) to confirm this issue at our end? Thanks, Chiranjeevi.
[1 Mar 2017 6:13]
Yenan Wang
Dummy code to repeat the situation.
Attachment: Program.cs (text/plain), 1.53 KiB.
[1 Mar 2017 6:15]
Yenan Wang
Modify source code of MySql.Data to emulate the network issue.
Attachment: emulate_network_issue.png (image/png, text), 33.73 KiB.
[1 Mar 2017 6:18]
Yenan Wang
I uploaded some dummy code to repeat the situation,but have to modify the source code of MySql.Data at first to emulate the network issue which may cause the problem.
[29 Sep 19:19]
Jose Ramirez Ruiz
Verified.
[29 Sep 19:22]
Jose Ramirez Ruiz
Posted by developer: The report is valid. The problematic control flow is still present. - OpenInternal marks the connection as open before driver.Configure(...) runs: [MySqlConnection.cs (line 781)]. - A configuration failure is outside the preceding try/catch, so it propagates while the driver remains attached. - A caller’s Dispose/Close then calls CloseFully, which returns any open pooled driver to the pool: [MySqlConnection.cs (line 1022)]. - ReleaseConnection only rejects expired/clearing connections; it does not verify that initialization/configuration completed successfully before enqueueing it idle: [MySqlPool.cs (line 330)]. That exactly supports the report’s scenario: a network failure during server-property or charset configuration can leave a partially configured/broken connection in the idle pool, contaminating a later checkout. The async path has the same ordering at [MySqlConnection.cs (line 910)].
