[freetds] Memory leaks in sql calls
csong at Securify.com
Wed Oct 3 15:40:24 EDT 2007
I'm new to this list and I have a question regarding memory leaks with
the sql query call to executeUpdate().
I compiled and installed the latest odbc++ and unixodbc packages on my
Then modified libodbc++-0.2.4pre3/tests/mysql.cpp to call the existing
dropTables() function in mysql.cpp 6500 times and the leak is about 20
MB. Here is what I did to mysql.cpp:
In main(), change the 1st dropTable() call to:
for (int i=0; i<6500; i++)
In other words, call dropTables() 6500 times and then sleep for 5
minutes so you have time to see the run-time size of mysql using 'top'
cmd. The leak size is about 20 MB which is what I origially saw in an
older version of odbc++ and unixodbc libs. I'm running this on linux
with a Sybase database and the driver is freetds ('dmtest' program shows
Does anyone experience the same problem? The leak may come from either
odbc++, unixodbc or freetds and I have posted the same question to
odbc++ and unixodbc discussion forums, but have not gotten any firm
answer regarding the source of the leak. Thanks you for your help.
More information about the FreeTDS