Leak with prepared statements and mysql_server_prepare=1

Leak with prepared statements and mysql_server_prepare=1

am 03.05.2007 13:20:37 von Mika Raento

Hiya

Bug #27046 http://bugs.mysql.com/bug.php?id=27046 makes
mysql_server_prepare=1 unusable, because of the statement handle leak. I
added a comment to the bug with a possible fix - basically adding
mysql_stmt_close(imp_sth->stmt) to dbd_st_finish. It does fix the most
basic case and passes all tests.

What I don't quite get is why the non-mysql_server_prepare codepath
doesn't leak statements, as I don't see it releasing them either. Maybe
they are automatically re-used somehow?

Mika

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Leak with prepared statements and mysql_server_prepare=1

am 03.05.2007 17:12:32 von Patrick Galbraith

Mika Raento wrote:

> Hiya
>
> Bug #27046 http://bugs.mysql.com/bug.php?id=27046 makes
> mysql_server_prepare=1 unusable, because of the statement handle leak.
> I added a comment to the bug with a possible fix - basically adding
> mysql_stmt_close(imp_sth->stmt) to dbd_st_finish. It does fix the most
> basic case and passes all tests.
>
> What I don't quite get is why the non-mysql_server_prepare codepath
> doesn't leak statements, as I don't see it releasing them either.
> Maybe they are automatically re-used somehow?
>
> Mika
>
Mika,

I will look at this patch, kitos for the patch!

Patrick

--
Patrick Galbraith, Senior Programmer
Grazr - Easy feed grazing and sharing
http://www.grazr.com

Satyam Eva Jayate - Truth Alone Triumphs
Mundaka Upanishad




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org