freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Song, Cavin" <csong AT Securify.com>
- To: <freetds AT lists.ibiblio.org>
- Subject: [freetds] Memory leaks in sql calls
- Date: Wed, 3 Oct 2007 12:40:24 -0700
Hi,
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
linux box:
libodbc++-0.2.4pre3
unixODBC-2.2.11
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++)
dropTables(con.get());
sleep(300);
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
the following):
Available datasources:
local (FreeTDS)
Available drivers:
FreeTDS
Attribute: Description=FreeTDS
Attribute: Driver=/usr/local/lib/libtdsodbc.so.0
Attribute: Setup=/usr/local/lib/libtdsS.so.1
Attribute: FileUsage=1
Attribute: CPTimeout=
Attribute: CPReuse=
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.
Cavin Song
-
[freetds] Memory leaks in sql calls,
Song, Cavin, 10/03/2007
- Re: [freetds] Memory leaks in sql calls, James K. Lowden, 10/03/2007
Archive powered by MHonArc 2.6.24.