selectcol_arrayref failure with DBD::mysql 3.002_4

Giuseppe Maxia <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
With  the latest developmend version (3.002_4), selectcol_arrayref
does not work as expected. Instead of returning the first column
of the dataset, it returns undef.

Here is a test case:

#!/usr/bin/perl
use strict;
use warnings;
use DBI;
use Data::Dumper;

my $HOST = 'localhost';

my $dbh = DBI->connect("DBI:mysql:test;host=$HOST"
     . ";mysql_read_default_file=$ENV{HOME}/.my.cnf",
     undef,undef, {RaiseError => 1})
     or die q{can't connect\n};

my $query = qq{show tables from test};
print $DBD::mysql::VERSION, "\n";
print Dumper($dbh->selectcol_arrayref($query));

Running this test with the previous versions, gives correct results:

3.0002
$VAR1 = [
           'testaa',
           'testad'
         ];

3.0002_2
$VAR1 = [
           'testaa',
           'testad'
         ];

In the latest version, though, it fails:

3.0002_4
$VAR1 = [
           undef,
           undef
         ];

Regards,

Giuseppe

-- 
Giuseppe Maxia
CTO
http://www.StarData.it
MySQL Certified Professional

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.