Skip Menu |

This queue is for tickets about the Text-CSV_XS CPAN distribution.

Report information
The Basics
Id: 97742
Status: resolved
Priority: 0/
Queue: Text-CSV_XS

People
Owner: Nobody in particular
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: 1.11



Subject: DBD::CSV 0.43 fails with Text::CSV_XS 1.10
with Text::CSV_XS 1.09 it works fine

there are many many failures like this:
t/00_meta.t ......... skipped: Author tests not required for installation
t/00_pod.t .......... ok
t/00_pod_cov.t ...... ok
t/10_base.t ......... 1/? # Showing relevant versions (DBI_SQL_NANO = not set)
# Using DBI            version 1.63
# Using DBD::File      version 0.42
# Using SQL::Statement version 1.405
# Using Text::CSV_XS   version 1.10
# DBD::CSV                 0.43 using Text::CSV_XS (1.10)
#   DBD::File              0.42 using IO::File (1.16)
#     DBI::DBD::SqlEngine  0.06 using SQL::Statement 1.405
# DBI                      1.63
# OS                       MSWin32 (6.2)
# Perl                     5.018002 (MSWin32-x86-multi-thread-64int)
t/10_base.t ......... ok
t/11_dsnlist.t ...... ok
t/20_createdrop.t ... ok
t/30_insertfetch.t .. 2/? DBD::CSV::st execute failed: Error 2012 while reading file C:\Users\miko\.cpanm\work\1407166260.20128\DBD-CSV-0.43\output12676\testaa:
 EOF - End of data in parsing input stream @ line 12 pos 0 at D:/strawberry32/perl/site/lib/SQL/Statement.pm line 1079.
 [for Statement "select * from testaa where id = 1"] at t/30_insertfetch.t line 66, <GEN8> line 2.

#   Failed test 'execute'
#   at t/30_insertfetch.t line 66.
DBD::CSV::st fetch failed: Attempt to fetch row without a preceding execute () call or from a non-SELECT statement [for Statement "select * from testaa where id
 = 1"] at t/30_insertfetch.t line 67, <GEN8> line 2.

#   Failed test 'error'
#   at t/30_insertfetch.t line 68.
#          got: 'Attempt to fetch row without a preceding execute () call or from a non-SELECT statement'
#     expected: undef
DBD::CSV::db do failed: Error 2012 while reading file C:\Users\miko\.cpanm\work\1407166260.20128\DBD-CSV-0.43\output12676\testaa: EOF - End of data in parsing i
nput stream @ line 18 pos 0 at D:/strawberry32/perl/site/lib/SQL/Statement.pm line 376.
 [for Statement "delete from testaa"] at t/30_insertfetch.t line 83.

#   Failed test 'delete all'
#   at t/30_insertfetch.t line 83.

#   Failed test 'Just two lines'
#   at t/30_insertfetch.t line 88.
#          got: '5'
#     expected: '2'

#   Failed test 'data'
#   at t/30_insertfetch.t line 90.
#          got: '2,"Crocodile Dundee",2222,"Down Under"'
#     expected: '0,,,'
# Looks like you failed 5 tests of 38.
t/30_insertfetch.t .. Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/38 subtests
t/31_delete.t ....... 1/? DBD::CSV::db do failed: Error 2012 while reading file C:\Users\miko\.cpanm\work\1407166260.20128\DBD-CSV-0.43\output12304\testaa: EOF
- End of data in parsing input stream @ line 25 pos 0 at D:/strawberry32/perl/site/lib/SQL/Statement.pm line 400.
 [for Statement "delete from testaa where id = 99"] at t/31_delete.t line 44.

#   Failed test 'true non-existing delete RV (via do)'
#   at t/31_delete.t line 45.
Use of uninitialized value $got in numeric eq (==) at (eval in cmp_ok) t/31_delete.t line 46.
DBD::CSV::db do failed: Error 2012 while reading file C:\Users\miko\.cpanm\work\1407166260.20128\DBD-CSV-0.43\output12304\testaa: EOF - End of data in parsing i
nput stream @ line 36 pos 0 at D:/strawberry32/perl/site/lib/SQL/Statement.pm line 400.
 [for Statement "delete from testaa where id =  9"] at t/31_delete.t line 47.

#   Failed test 'delete single (count) (via do)'
#   at t/31_delete.t line 47.
#          got: undef
#     expected: '1'
DBD::CSV::db do failed: Error 2012 while reading file C:\Users\miko\.cpanm\work\1407166260.20128\DBD-CSV-0.43\output12304\testaa: EOF - End of data in parsing i
nput stream @ line 47 pos 0 at D:/strawberry32/perl/site/lib/SQL/Statement.pm line 376.
 [for Statement "delete from testaa where id >  7"] at t/31_delete.t line 48.

#   Failed test 'delete more   (count) (via do)'
#   at t/31_delete.t line 48.
#          got: undef
#     expected: '2'
DBD::CSV::st execute failed: Error 2012 while reading file C:\Users\miko\.cpanm\work\1407166260.20128\DBD-CSV-0.43\output12304\testaa: EOF - End of data in pars
ing input stream @ line 58 pos 0 at D:/strawberry32/perl/site/lib/SQL/Statement.pm line 400.
 [for Statement "delete from testaa where id = 88"] at t/31_delete.t line 50, <GEN20> line 11.

#   Failed test 'true non-existing delete RV (via prepare/execute)'
#   at t/31_delete.t line 51.
Use of uninitialized value $got in numeric eq (==) at (eval in cmp_ok) t/31_delete.t line 52.
DBD::CSV::st execute failed: Error 2012 while reading file C:\Users\miko\.cpanm\work\1407166260.20128\DBD-CSV-0.43\output12304\testaa: EOF - End of data in pars
ing input stream @ line 69 pos 0 at D:/strawberry32/perl/site/lib/SQL/Statement.pm line 400.
 [for Statement "delete from testaa where id =  7"] at t/31_delete.t line 53, <GEN21> line 11.

#   Failed test 'delete single (count) (via prepare/execute)'
#   at t/31_delete.t line 53.
#          got: undef
#     expected: '1'
DBD::CSV::st execute failed: Error 2012 while reading file C:\Users\miko\.cpanm\work\1407166260.20128\DBD-CSV-0.43\output12304\testaa: EOF - End of data in pars
ing input stream @ line 80 pos 0 at D:/strawberry32/perl/site/lib/SQL/Statement.pm line 376.
 [for Statement "delete from testaa where id >  4"] at t/31_delete.t line 54, <GEN22> line 11.
Subject: Re: [rt.cpan.org #97742] DBD::CSV 0.43 fails with Text::CSV_XS 1.10
Date: Mon, 4 Aug 2014 18:12:07 +0200
To: bug-DBD-CSV [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Mon, 4 Aug 2014 11:34:44 -0400, "kmx via RT" <bug-DBD-CSV@rt.cpan.org> wrote: Show quoted text
> Subject: DBD::CSV 0.43 fails with Text::CSV_XS 1.10
Verified. I found that the eof method is now slightly broken. The fix for DBD::CSV is easy, and I will release 0.44 asap Thanks for reporting. The workaround is thus: diff --git a/lib/DBD/CSV.pm b/lib/DBD/CSV.pm index 23e50e4..e2a0cf0 100755 --- a/lib/DBD/CSV.pm +++ b/lib/DBD/CSV.pm @@ -336,6 +336,8 @@ sub fetch_row $csv->eof and return; my @diag = _csv_diag ($csv); + $diag[0] == 2012 and return; # Also EOF (broken in Text::CSV_XS-1.10) + my $file = $tbl->{f_fqfn}; croak "Error $diag[0] while reading file $file: $diag[1] \@ line $diag[3] pos $diag[2]"; } -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.19 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Download (untitled)
application/pgp-signature 490b

Message body not shown because it is not plain text.

DBD::CSV-0.44 released with the workaround (and a few other patches)