MySQL Forums
Forum List  »  Connector/ODBC

MySql ODBC Memory Leak?
Posted by: M K
Date: November 28, 2017 01:36PM

I have a very simple Microsoft Access subroutine that continuously loops until a condition is met. Within the loop, I am accessing a single linked MySql table (via ODBC) which has only one row and three small fields. I use DAO to obtain the value of one boolean field, and when that field changes from false to true, the loop exits. As soon as the loop starts, I can see that RAM consumed by Access starts to increase rapidly and continually does this as execution continues. Eventually (~30 minutes later) the loop crashes with a "resources exceeded" error.

If I copy the linked table to my Access database and run the loop off the native Access table, memory stays constant. So, it appears that accessing the table via the MySQL ODBC driver is causing the issue. To free up resources, I close the DAO objects and set them to "nothing".

Here is my test code:

Sub Test()

Dim dbsControls As DAO.Database
Dim rstControls As DAO.Recordset
Dim boolStopLoop As Boolean

boolStopLoop = False
While Not boolStopLoop

' get control parameters

Set dbsControls = CurrentDb
Set rstControls = dbsControls.OpenRecordset("control")
rstControls.MoveFirst
boolStopLoop = rstControls!boolStopLoop

rstControls.Close
dbsControls.Close
Set rstControls = Nothing
Set dbsControls = Nothing

Wend

End Sub

I ran another test where I continually run an Access query to copy the contents of the MySql table to a local Access database. Same result - memory usage keeps rising.

I running Access 2013 (32-bit) on Windows 10 Pro. I have the latest 32-bit MySql and MySql ODBC driver (5.03.09).

I suspect there's a memory leak issue. Does anyone have advice how to resolved this issue?


Thanks,
Michael

Options: ReplyQuote


Subject
Written By
Posted
MySql ODBC Memory Leak?
M K
November 28, 2017 01:36PM
M K
November 28, 2017 02:42PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.