Bug #92112 | Memory leak when client APIs called after mysql_close | ||
---|---|---|---|
Submitted: | 21 Aug 2018 20:14 | Modified: | 5 Feb 2019 14:55 |
Reporter: | Manuel Ung | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S3 (Non-critical) |
Version: | 8.0.11, 8.0.12, 5.7.23 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[21 Aug 2018 20:14]
Manuel Ung
[22 Aug 2018 4:50]
MySQL Verification Team
Hello Manuel, Thank you for the report! regards, Umesh
[22 Aug 2018 4:54]
MySQL Verification Team
test results
Attachment: 92112_8.0.12.results (application/octet-stream, text), 273.53 KiB.
[23 Aug 2018 12:14]
MySQL Verification Team
5.7.23 - test results
Attachment: 92112_5.7.23.results (application/octet-stream, text), 7.78 KiB.
[28 Jan 2019 10:35]
Shishir Jaiswal
IMHO it's not a bug. https://dev.mysql.com/doc/refman/5.7/en/c-api-threaded-clients.html says, "When you call mysql_init(), MySQL creates a thread-specific variable for the thread that is used by the debug library (among other things). If you call a MySQL function before the thread has called mysql_init(), the thread does not have the necessary thread-specific variables in place and you are likely to end up with a core dump sooner or later."
[5 Feb 2019 14:55]
Paul DuBois
Posted by developer: After you call mysql_close() to close a connection handler, you're supposed to stop using it. Further use is bound to cause trouble. I'll add a note to that effect to the mysql_close() section.