List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:April 16 1999 6:11am
Subject:Re: Memory leaking like a sieve in mysql client api.
View as plain text  
>>>>> "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
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