Bug 208012

Summary: DBD::CSV::Statement missing
Product: [Fedora] Fedora Reporter: Need Real Name <lsof>
Component: perl-DBD-CSVAssignee: Jose Pedro Oliveira <jose.p.oliveira.oss>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 5CC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: perl-DBD-CSV-0.22-5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-26 21:29:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2006-09-25 20:16:19 UTC
Using the example from the readme, I get the following error:

DBD::CSV::st execute failed: Can't locate object method "command" via package
"DBD::CSV::Statement" at /usr/lib/perl5/vendor_perl/5.8.8/DBD/CSV.pm line 156.
 [for Statement "SELECT * FROM a"] at b.pl line 16.
DBD::CSV::st fetchrow_array failed: Attempt to fetch row from a Non-SELECT
statement [for Statement "SELECT * FROM a"] at b.pl line 18.


To reproduce, run this:

use DBI;
$dbh = DBI->connect("DBI:CSV:f_dir=$HOME/csvdb")
or die "Cannot connect: " . $DBI::errstr;
$sth = $dbh->prepare("CREATE TABLE a (id INTEGER, name CHAR(10))")
or die "Cannot prepare: " . $dbh->errstr();
$sth->execute() or die "Cannot execute: " . $sth->errstr();
$sth->finish();

then this:

use DBI;
$dbh = DBI->connect(qq{DBI:CSV:csv_sep_char=\\;});
           $sth = $dbh->prepare("SELECT * FROM a");
$sth->execute();
while (my @row = $sth->fetchrow_array) {
        print "@row\n";
}

Comment 1 Jose Pedro Oliveira 2006-09-26 11:38:26 UTC
I'm unable to reproduce this in FC-5 using a /tmp location.

By the way what's the value of $HOME ?
(shouldn't it be $ENV{$HOME}?)

Could you also append the output of 
"rpm -q perl-DBI perl-DBD-CSV perl-SQL-Statement perl-Text-CSV_XS"?

Comment 2 Need Real Name 2006-09-26 13:50:47 UTC
perl-SQL-Statement isn't installed. Maybe the dependencies are wrong?

Comment 3 Jose Pedro Oliveira 2006-09-26 21:05:40 UTC
I was able to duplicate the problem when I uninstalled the SQL::Statement perl
module. Adding perl(SQL::Statement) to the requirements list.

Comment 4 Jose Pedro Oliveira 2006-09-26 21:29:45 UTC
perl-DBD-CSV-0.22-5 has just been built for FC-4, FC-5, and devel.  This release
now explicitly requires perl(SQL::Statement). It will also take one or two days
for it to appear in the mirrors (a push has just been missed).

Pleases re-open this ticket if the problem persists.

jpo

Comment 5 Need Real Name 2006-09-26 21:40:07 UTC
Will do - thanks!

Comment 6 Jose Pedro Oliveira 2006-09-26 21:45:48 UTC
FYI:
The *unsigned* RPMS/SRPMS are available from this page
http://buildsys.fedoraproject.org/build-status/success.psp
(just follow the "JOB ID" links).