You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: When in async mode, fetchall_arrayref's $slice functionality is broken because $sth's attributes cannot be fetched.
Environment:
perl 5.12.4
DBI::mysql 4.22
OS: Mac OSX 10.8.2, Linux Mint 12
Here is the code snippet to reproduce it
my $dbh = DBI->connect($dsn, $user, $pass);
my $sth = $dbh->prepare("select sleep(3) as sleep, 3 as number", { async => 1});
$sth->execute;
my $attr = $sth->FETCH('FetchHashKeyName');
print Dumper($attr);
# the NAME attribute is not populated
my $names = $sth->FETCH($attr); # $names is undef. In sync mode, this will be populated with the column names [ 'sleep', 'number']
print Dumper($names), "\n";
until($sth->mysql_async_ready) {
say 'not ready yet!';
sleep 1;
}
my $rows = $sth->fetchall_arrayref( {} ); # Fail with the following error
# Can't use an undefined value as an ARRAY reference at /Library/Perl/5.12/darwin-thread-multi-2level/DBI.pm line 2054.
Thanks
Migrated from rt.cpan.org#80036 (status was 'open')
Requestors:
From mytram2@gmail.com on 2012-10-06 06:37:05:
From https://www.google.com/accounts/o8/id?id=aitoawmmgszlzzbgfzbgcq1gk0p8kiw2p0pzuw8 on 2012-10-10 22:13:46
The text was updated successfully, but these errors were encountered: