List:General Discussion« Previous MessageNext Message »
From:. Date:January 1 1970 12:00am
Subject:Re: Memory leaking like a sieve in mysql client api.
View as plain text  
On Fri, 16 Apr 1999, Michael Widenius wrote:

>>>>>> "Benjamin" == Benjamin Scherrey <scherrey@stripped> writes:
>
>Benjamin> OK - this is what was biting me and led to the other problems. I need to
> be able to
>Benjamin> init a MSQL structure then close it without having a connection because
> this occurs in
>Benjamin> the ctor/dtor respectively of a class. An instance of that class may come
> into and out
>Benjamin> of existence without ever having made a connection which results in my
> application
>Benjamin> locking up. I'd prefer a code workaround rather than patching the
> libmysql.c source
>Benjamin> because this program will get deployed on multiple boxes and don't want
> to have custom
>Benjamin> MySQL builds all over the place. This leaves me with two questions:
>
>Benjamin> A) Is there something I can test in the MYSQL structure to confirm its
> safe to close
>Benjamin> it?
>
>No. You can however yourself use the construct:
>
>mysql->net.fd= INVALID_SOCKET;
>
>In your code to make mysql_close() safe.
>
>Benjamin> B) Will you include the code fix for libmysql.c in future releases of
> MySQL and make
>Benjamin> this problem go away?
>
>Of course;  All patches I post to the list will be included in the
>next MySQL version (If I haven't stated otherwise)
>
>Benjamin>     thanx much,
>
>Benjamin>         Ben Scherrey
>
>Regards,
>Monty
>
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail mysql-thread1933@stripped
>
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail mysql-unsubscribe@stripped instead.
>
>

how about setting:

mysql->free_me = 1;

before mysql_close() is called. would that guarantee the mysql is purged
when mysql_close() is issued ? i am having a similar problem with
mysql+apache.

on apache, one must register a cleanup (free()) for a later
time and seems mysql_close() is not releasing all the allocated
mem.


Thread
Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
  • Re: Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
  • Re: Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
  • Re: Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
  • Re: Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
    • Re: Memory leaking like a sieve in mysql client api.Michael Widenius15 Apr
  • Memory leaking like a sieve in mysql client api.Michael Widenius15 Apr
  • Re: Memory leaking like a sieve in mysql client api.Benjamin Scherrey15 Apr
    • Re: Memory leaking like a sieve in mysql client api.Michael Widenius16 Apr
      • Re: Memory leaking like a sieve in mysql client api..16 Apr
        • Re: Memory leaking like a sieve in mysql client api.Michael Widenius17 Apr
Re: Memory leaking like a sieve in mysql client api.Fred Lindberg15 Apr
Re: Memory leaking like a sieve in mysql client api.Fred Lindberg15 Apr