List:MySQL ODBC« Previous MessageNext Message »
From:Americo Motoya Date:March 18 1999 1:00am
Subject:En: Memory Leak
View as plain text  

>>Americo> We are evaluating MySql + MyODBC for Win32 and we are close to
>register the
>>Americo> version.
>>
>>Americo> But we are experiencing problems with memory leak after several
>queries
>>Americo> ("select * from", "select cout(*)") through recordset method in
>ASP.
>>
>>Americo> We have Win95 as a Web client and the server side is a Win98 with
>PWS. The
>>Americo> version of MySQL is 3.21.29 gamma and MyODBC is 2.50.19.
>>
>>Americo> The MySql client code is as follows (just for tests):
>>
>>Americo>         objCM = Server.CreateObject("ADODB.Command");
>>Americo>
>objCM.ActiveConnection="DSN=dbEmpresas;UID=query_uid;PWD=query_pwd";
>>Americo>         strSQLIn = "SELECT * FROM " + TableName;
>>Americo>         objCM.CommandText=strSQLIn;
>>Americo>         objCM.Execute();
>>Americo>         objCM.Close;
>>
>>
>>Americo> The same code with MS-ACCESS+ODBC works fine!
>>Americo> I have tried other methods of connection and the result is the
>same.
>>
>>Americo> Have any problem of this kind in the shareware version?
>>
>>Hi!
>>
>>Sorry, I don't know of any memory leaks with the MySQL code;  We test
>>all MySQL distributions with purify, so there shouldn't be any memory
>>leaks.
>>
>>What happens ?
>>
>>Can you somehow verify if its MySQL or MyODBC that gives you a
>>problem ?
>>
>>If you are using mysqld (instead of mysqld-opt), you can verify how
>>much memory MySQL is using with:
>>
>>mysqladmin ver
>>
>>Is this increasing over time ?
>>
>>Regards,
>>Monty
>>
>>---------------------------------------------------------------------




The tests I have done with MySQL+MyODBC:

1 - MySQL selects with MySQLWinAdmin: No problems with native clients (don't
use MyODBC). So     MySQLD is out of question.

2 - MySQL selects with MS-ACCESS + MyODBC: No problems.

3 - MySQL selects using ASP (JScript) + MyODBC: Problems.

     function TestLeak(){
              var MyConn=Server.CreateObject("ADODB.Connection");
              var MySql= "SELECT COUNT(*) FROM Lojas";

              MyConn.Open("DSN=dbEmpresas;UID=query_uid;PWD=query_pwd");
              MyConn.Execute(MySql);
              MyConn.Close();
              }
Note: I took this code from a WEB Site.
After 20 queries approximately  2% of memory is lost (cumulative) even after
closing all application: Browser, web server, etc.
I also checked with VBScript without success.

4 - MS-ACCESS selects using ASP (JScript) + ODBC: No problems with the same
code above, just changing the DSN name.

     function TestLeak(){
              var MyConn=Server.CreateObject("ADODB.Connection");
              var MySql= "SELECT COUNT(*) FROM Lojas";

              MyConn.Open("DSN=dbEmpresasMDB");
              MyConn.Execute(MySql);
              MyConn.Close();
              }


5 -Conclusion:  So I think the problem is  between ASP and MyODBC.
I have tried MyODBC version 2.50.19 and  2.50.21 (for Win95) with debug
features and the optimized versions.
Options: "Return matching rows" as described in MyODBC Readme file.

I asked my colleague to test that for me in another machine and the result
is the same. What are we doing wrong ?
ADO is not a good partner to MySQL/MyODBC ?


6 - Have anyone  tried connecting MySQL with ASP/ADO (Win98 + PWS) using
MyODBC?


Best Regards,

Americo







Thread
En: Memory LeakAmerico Motoya18 Mar