Re: DBD::mysql 3.0003 and 3.0003_1 released

Re: DBD::mysql 3.0003 and 3.0003_1 released

am 08.05.2006 19:05:07 von anatskovich

Hello,

Have somebody been lucky to utilize stored procedures that returns
multiple result sets? I was trying to it exactly as in the example and
it just returns 1 row... The sample code itself returns just 1 row.

ps. mysql_mutli_results=1 is specified in connection string.


Patrick Galbraith wrote:
> Dear DBD::mysql users,
>
> DBD::mysql version 3.0003 (stable, production) and 3.0003_1 (dev) have
> been released!

Re: DBD::mysql 3.0003 and 3.0003_1 released

am 09.05.2006 15:04:34 von Martin.Evans

On 08-May-2006 Alex wrote:
> Hello,
>
> Have somebody been lucky to utilize stored procedures that returns
> multiple result sets? I was trying to it exactly as in the example and
> it just returns 1 row... The sample code itself returns just 1 row.
>
> ps. mysql_mutli_results=1 is specified in connection string.
>
>
> Patrick Galbraith wrote:
>> Dear DBD::mysql users,
>>
>> DBD::mysql version 3.0003 (stable, production) and 3.0003_1 (dev) have
>> been released!
I don't use them myself but when I tried with 3.0003_1 I got:

#!/usr/bin/perl -w

use DBI qw (neat_list);

my $dbh = DBI->connect('dbi:mysql:xxx;mysql_multi_results=1','xxx');

my $sth = $dbh->prepare(q/call mrs()/);
$sth->execute;
while (my @row = $sth->fetchrow_array) {
print neat_list(\@row, 10, ",'"),"\n";
}
print "END\n";
$sth->more_results;
while (my @row = $sth->fetchrow_array) {
print neat_list(\@row, 10, ",'"),"\n";
}


result-set-1
DBD::mysql::st more_results failed: Malformed packet at ./x.pl line 13.
DBD::mysql::st fetchrow_array failed: no statement executing

I'm not at all sure mysql_multi_results=1 is acted upon by anything now.
Certainly dbdimp.c contains code which sets CLIENT_MULTI_RESULTS if you have a
recent enough mysql.

Martin
--
Martin J. Evans
Easysoft Ltd, UK
http://www.easysoft.com