Leak with prepared statements and mysql_server_prepare=1

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 [at] m .gmane.org
Mika Raento [ Do, 03 Mai 2007 13:20 ] [ ID #1703557 ]

Re: Leak with prepared statements and mysql_server_prepare=1

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 [at] m .gmane.org
Patrick Galbraith [ Do, 03 Mai 2007 17:12 ] [ ID #1703558 ]
Datenbanken » gmane.comp.db.mysql.perl » Leak with prepared statements and mysql_server_prepare=1

Vorheriges Thema: crash in DBD::mysql/ statement leak in DBD::mysql
Nächstes Thema: batch sql SOURCE command