Re: Perl calling MYSQL 5 stored procedure
Thanks for the patch. Could you tell me about your setup because, although calling the SP w/ the patch works on my setup, it only works once. Doing something like:
$dbh = DBI->connect("DBI:mysql:;host=localhost;mysql_multi_results=1", foo, bar) or die;
$query = $dbh->prepare("CALL whatever (1, 2)");
$query->execute();
while(@rows = $query->fetchrow_array()) { ... }
$query->finish();
$query = $dbh->prepare("SELECT * FROM whatever;");
$query->execute();
The second execute() will die w/ the error message: DBD::mysql::st execute failed: Lost connection to MySQL server during query at ...
I'm using DBI 1.48 and have tried DBD-mysql 3.0002 and 2.9006. MySQL standard RPM 5.0.11 beta. The SP is a single SELECT statement like:
CREATE PROCEDURE whatever (d INT, id INT)
SELECT * FROM table WHERE ymd=d AND foo=id;