# [PATCH]mysql_pconnect leaks file descriptors on reconnect

- Thread: https://externals.io/message/54779
- Original archive: https://news-web.php.net/php.internals/54779
- Started by Laruence on 2011-08-22T08:40:07+00:00
- Messages: 6
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #54779 — Laruence — 2011-08-22T08:40:07+00:00

URL: https://externals.io/message/54779#54779

georg, andery, ulf:

    hello,  there is a bug in mysqlnd,  the details about this bug can
be found at https://bugs.php.net/bug.php?id=55473

    I found the reason is that mysqlnd_connect didn't free the stream
when doing reconnect.

    I have submitted a patch for  this,  but I am not very sure the
patch is okey.

    could you review this patch?  thanks.

-- 
Laruence  Xinchen Hui
http://www.laruence.com/

---

## #54781 — Laruence — 2011-08-22T09:14:09+00:00

URL: https://externals.io/message/54779#54781 · In reply to: #54779

Hi:

    and the reason for why this cleanup cound not be done in dtor,  is
that in dtor,
it also clean the content, option, which should not free at that memont,

    alos IMO, that is not a dtor time in theory(reconnecting with a
same mysql->conn).

thanks

2011/8/22 Laruence <laruence@php.net>:
> georg, andery, ulf:
>
>    hello,  there is a bug in mysqlnd,  the details about this bug can
> be found at https://bugs.php.net/bug.php?id=55473
>
>    I found the reason is that mysqlnd_connect didn't free the stream
> when doing reconnect.
>
>    I have submitted a patch for  this,  but I am not very sure the
> patch is okey.
>
>    could you review this patch?  thanks.
>
> --
> Laruence  Xinchen Hui
> http://www.laruence.com/
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

---

## #54783 — Andrey Hristov — 2011-08-22T09:47:34+00:00

URL: https://externals.io/message/54779#54783 · In reply to: #54779

Hi,


> georg, andery, ulf:
>
>      hello,  there is a bug in mysqlnd,  the details about this bug can
> be found at https://bugs.php.net/bug.php?id=55473
>
>      I found the reason is that mysqlnd_connect didn't free the stream
> when doing reconnect.
>
>      I have submitted a patch for  this,  but I am not very sure the
> patch is okey.
>
>      could you review this patch?  thanks.
>
can you resend the patch, name it .txt, anything else doesn't get 
through the ML, AFAIK.

Andrey

---

## #54784 — Pierre Joye — 2011-08-22T09:56:42+00:00

URL: https://externals.io/message/54779#54784 · In reply to: #54783

it is attached to the bug :)


>  Hi,
>
> 
> > […]
> can you resend the patch, name it .txt, anything else doesn't get through
> the ML, AFAIK.
>
> Andrey
>
>
>
> --
> 
> 
>
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #54785 — Andrey Hristov — 2011-08-22T10:04:50+00:00

URL: https://externals.io/message/54779#54785 · In reply to: #54784

Hi,
I have a fix, currently running the full test suite. Will commit soon.

Best,
Andrey


> it is attached to the bug :)
>
> 
> > […]

---

## #54787 — Pierre Joye — 2011-08-22T10:07:32+00:00

URL: https://externals.io/message/54779#54787 · In reply to: #54785

btw, pls commit to 5.3 after 5.3.8 (to be pkged today)


>  Hi,
> I have a fix, currently running the full test suite. Will commit soon.
>
> Best,
> Andrey
>
> 
> > […]
>
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
