List:General Discussion« Previous MessageNext Message »
From:KKoTY Date:December 29 2003 6:03pm
Subject:Re: Problem with mysql_close() API
View as plain text  
hi, i had same problem. But after I put mysql_free_result(MYSQL_RES
*pResult)
after fetching rows from query (or generaly after calling all queries), it
was OK without this message.
I think there is a problem when you allocate memory for result of a query
(with mysql_store_result(MYSQL  *myData)),
and you dont call mysql_free_result() to free this allocated memory, than
memory leaks are detected, and Access Violation Error proceed.


----- Original Message -----
From: "Leo" <leo@stripped>
To: <mysql@stripped>
Sent: Monday, December 29, 2003 7:24 AM
Subject: Problem with mysql_close() API


Hi All,

i have a problem everytime i call the function mysql_close(),
it result in Access Violation Error in module libmysql.dll

fyi,
im migrating from 3.23.52 to 4.0.x
server runs under linux,
im accesing the server through windows based application
built with delphi, using Object Pascal translation from C API (by Jorge del
Conde)
with the library i took from mysql directory

the flow is similiar like this:

mysql_init(@myconnection);
mysql_real_connect(@myconnection,...);
...
some proccess
...
mysql_close(@myconnection); <-- this is where the error raised


i slip in mysql_init before mysql_close, and the problem disappear..

mysql_init(@myconnection);
mysql_real_connect(@myconnection,...);
...
some proccess
...
mysql_init(@myconnection);
mysql_close(@myconnection); <-- this is where the error raised

is this normal??
is this how it should be? i've red the manual, and there is none mentioning
that i have to do init before cloaing one.

thanks for any comment

--
Regards
Leonardus Setiabudi
IT Project Coordinator
PT Bina San Prima, www.binasanprima.com


Thread
Redhat crash - help neededDan Goodes29 Dec
  • Problem with mysql_close() APILeo29 Dec
  • Re: Problem with mysql_close() APIKKoTY29 Dec
  • Re: Redhat crash - help neededDan Goodes29 Dec