Bug #66871 | #error 1040, Too many connections, How to disconnect mysql connection manual use | ||
---|---|---|---|
Submitted: | 19 Sep 2012 13:13 | Modified: | 9 Jan 2015 9:50 |
Reporter: | sonly strong | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / C++ | Severity: | S1 (Critical) |
Version: | 1.1.1 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[19 Sep 2012 13:13]
sonly strong
[18 Dec 2012 18:23]
Sveta Smirnova
Thank you for the report. Verified as described. To repeat run attached test and see SHOW PROCESSLIST output.
[18 Dec 2012 18:24]
Sveta Smirnova
test case
Attachment: bug66871.cpp (application/octet-stream, text), 1.55 KiB.
[23 Apr 2013 9:55]
Lawrenty Novitsky
The problem here is that statement handle is not freed. If you add "delete stmt" you will see that physical connection will close on either connector destruction event (if you destroy stmt before that). You have to do that anyway since you will leak memory otherwise. con->close() means more like you can do pretty much nothing with that object any more. while statement object(s) will still be operable. In fact at the moment c/c++ is pretty much "thread-agnostic" I deem this bug may be if not closed then severity can be lowered. Perhaps to feature request.