Bug #95675 Memory Leak in MySQL ODBC 8.0.16
Submitted: 6 Jun 2019 15:00 Modified: 5 Jun 2020 13:40
Reporter: Daniel Esteban Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:8.0.16 OS:Windows (Win 7)
Assigned to: CPU Architecture:Any

[6 Jun 2019 15:00] Daniel Esteban
Description:
I have an MFC program that will increase in memory usage only when a connection to a MySQL database is made.  If I comment out the section of code that opens the connection, no leaks are detected.  The CDatabase object is a declared variable, not dynamically allocated, so it should be releasing the memory when it goes out of scope.

I used "Deleaker" to test for leaks and it resulted in leaks found in myodbc8a.dll.  If I run the same program connecting to MSSQL no leaks are detected.

How to repeat:
Run program with a connection to the MySQL database.

Suggested fix:
Plug the leak, yo!
[21 Jun 2019 17:44] Daniel Esteban
Rewrote segments of code porting to the C++ connector instead of the ODBC connector and the memory leaks went away.  

I would MUCH prefer to use the ODBC connector so I can swap between test (MySQL) and current production (MSSQL) without major rewrites.  

Please advise as to the status of this bug report.
[5 May 2020 13:40] MySQL Verification Team
Please try version 8.0.20. Thanks.
[14 May 2020 16:58] Leigh Anderson
I have this memory leak issue with 8.0.20
If I use 5.3.14 there is no leak.
[6 Jun 2020 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".