Skip Menu |

This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id: 42676
Status: resolved
Priority: 0/
Queue: SQL-Statement

People
Owner: REHSACK [...] cpan.org
Requestors: cub.uanic [...] gmail.com
Marek.Rouchal [...] gmx.net
valkoles [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.17
Fixed in: 1.22



Subject: test error in 1.17 on perl-5.8.8 and Linux
When running tests of SQL-Statement-1.17 on perl-5.8.8 (RedHat Enterprise Linux 3.0 update 9, gcc 4.1.2, no threads), I see this error: t/16morejoins........1/48 # Failed test 'Full Joins (using ON condition) - values ok' # at t/16morejoins.t line 265. # got: ''5',,'5','zzz'' # expected: ',,'5','zzz'' # Failed test 'Left Joins (using ON t1.num = t2.num AND t2.wert = "xxx") - values ok' # at t/16morejoins.t line 292. # got: ''3','c','3','yyy'' # expected: ''3','c',,' # Failed test 'Left Joins (using ON t1.num = t2.num WHERE (t2.wert = "xxx" OR t2.wert IS NULL)) - values ok' # at t/16morejoins.t line 319. # got: '' # expected: ''3','c',,' # Looks like you failed 3 tests of 48. Unfortunately I don't have an idea what's going on - let me know if you need additional debugging information. Cheers, Marek
Hi Marek, I know about the bug - I added some more tests regarding the join behaviour, but the version 1.17 didn't intend to fix those bugs but fixes all known by fixes of the last 2 years. I added the tests and released 1.17 hoping 2 things: 1) Get more real life results about the stability of the applied fixes 2) Get some more patches fixing the one or other open problem (so that I don't need to code all on my own - and it worked - I got a fix for a problem in 1.16_04) I tried to use the failing tests to start Test-Driven-Development.
For this purpose, you can "TODO" tests, so we know that you know and cpan installs will pass. Currently they all fail. Test Summary Report ------------------- t/16morejoins.t (Wstat: 0 Tests: 48 Failed: 0) TODO passed: 42-43, 46-47 Files=18, Tests=335, 7 wallclock secs ( 0.32 usr 0.10 sys + 5.89 cusr 0.67 csys = 6.98 CPU) Result: PASS diff attached
--- t/16morejoins.t.org 2009-03-20 16:36:07 +0100 +++ t/16morejoins.t 2009-03-20 16:40:58 +0100 @@ -282,14 +282,17 @@ Results: $names = join(',',@{$sth->{NAME}}); cmp_ok( $names, 'eq', q{num,name,num,wert}, 'Left Joins (using ON t1.num = t2.num AND t2.wert = "xxx") - columns ok' ); -for my $res ( - q{'1','a','1','xxx'}, - q{'2','b',,}, - q{'3','c',,}, -) -{ - my $values = sprintf( q{%s}, join( q{,}, map { defined($_) ? "'" . $_ . "'" : '' } $sth->fetchrow_array() ) ); - cmp_ok( $values, 'eq', $res, 'Left Joins (using ON t1.num = t2.num AND t2.wert = "xxx") - values ok' ); +TODO: { + local $TODO = "Known fail. Already in RT"; + for my $res ( + q{'1','a','1','xxx'}, + q{'2','b',,}, + q{'3','c',,}, + ) + { + my $values = sprintf( q{%s}, join( q{,}, map { defined($_) ? "'" . $_ . "'" : '' } $sth->fetchrow_array() ) ); + cmp_ok( $values, 'eq', $res, 'Left Joins (using ON t1.num = t2.num AND t2.wert = "xxx") - values ok' ); + } } $sth = $dbh->prepare( "SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num WHERE (t2.wert = 'xxx' OR t2.wert IS NULL)"); @@ -309,14 +312,17 @@ Results: $names = join(',',@{$sth->{NAME}}); cmp_ok( $names, 'eq', q{num,name,num,wert}, 'Left Joins (using ON t1.num = t2.num WHERE (t2.wert = "xxx" OR t2.wert IS NULL)) - columns ok' ); -for my $res ( - q{'1','a','1','xxx'}, - q{'2','b',,}, - q{'3','c',,}, -) -{ - my $values = sprintf( q{%s}, join( q{,}, map { defined($_) ? "'" . $_ . "'" : '' } $sth->fetchrow_array() ) ); - cmp_ok( $values, 'eq', $res, 'Left Joins (using ON t1.num = t2.num WHERE (t2.wert = "xxx" OR t2.wert IS NULL)) - values ok' ); +TODO: { + local $TODO = "Known fail. Already in RT"; + for my $res ( + q{'1','a','1','xxx'}, + q{'2','b',,}, + q{'3','c',,}, + ) + { + my $values = sprintf( q{%s}, join( q{,}, map { defined($_) ? "'" . $_ . "'" : '' } $sth->fetchrow_array() ) ); + cmp_ok( $values, 'eq', $res, 'Left Joins (using ON t1.num = t2.num WHERE (t2.wert = "xxx" OR t2.wert IS NULL)) - values ok' ); + } } __DATA__
On Fr. 20. Mär. 2009, 11:43:31, HMBRAND wrote: Show quoted text
> For this purpose, you can "TODO" tests, so we know that you know and > cpan installs will pass.
Good hint, thank you very much. I'll include it with the next update. Show quoted text
> Currently they all fail. > > Test Summary Report > ------------------- > t/16morejoins.t (Wstat: 0 Tests: 48 Failed: 0) > TODO passed: 42-43, 46-47 > Files=18, Tests=335, 7 wallclock secs ( 0.32 usr 0.10 sys + 5.89 > cusr 0.67 csys = 6.98 CPU) > Result: PASS > > diff attached
Wow - what a service - but now I know and can also add all the other tests which fail (I kept them private, because work on them didn't start).
Subject: tests 16 failed
Date: Sun, 19 Apr 2009 15:14:15 -0400
To: bug-SQL-Statement [...] rt.cpan.org
From: val <valkoles [...] gmail.com>
Distribution: SQL-Statement-1.20 Perl version: This is perl, v5.10.0 built for MSWin32-x86-multi-thread (with 5 registered patches, see perl -V for more detail) Operation system: Windows XP SP3 or windows32 valpc 2.5.1 2600 i786-pc AMD unknown MinGW Error log (while nmake test): t/16morejoins.t ...... 1/48 # Failed test 'Left Joins (using ON t1.num = t2.num AND t2.wert = "xxx") - values ok' # at t/16morejoins.t line 292. # got: ''3','c','3','yyy'' # expected: ''3','c',,' # Failed test 'Left Joins (using ON t1.num = t2.num WHERE (t2.wert = "xxx" OR t2.wert IS NULL)) - values ok' # at t/16morejoins.t line 319. # got: '' # expected: ''3','c',,' # Looks like you failed 2 tests of 48. t/16morejoins.t ...... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/48 subtests t/17quoting.t ........ ok Test Summary Report ------------------- t/16morejoins.t (Wstat: 512 Tests: 48 Failed: 2) Failed tests: 44, 48 Non-zero exit status: 2 Files=18, Tests=335, 10 wallclock secs ( 0.14 usr + 0.11 sys = 0.25 CPU) Result: FAIL Failed 1/18 test programs. 2/335 subtests failed. NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0xff' Stop.
I get the same error on my system: Distribution: SQL-Statement-1.20 Perl version: This is perl, v5.10.0 built for darwin-thread-multi-2level Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Operation system: Mac OS X 10.4.11 On Sun Apr 19 15:14:46 2009, valkoles@gmail.com wrote: Show quoted text
> Distribution: SQL-Statement-1.20 > > Perl version: This is perl, v5.10.0 built for MSWin32-x86-multi-thread > (with 5 registered patches, see perl -V for more detail) > > Operation system: Windows XP SP3 or windows32 valpc 2.5.1 2600 i786-pc > AMD unknown MinGW > > > Error log (while nmake test): > t/16morejoins.t ...... 1/48 > # Failed test 'Left Joins (using ON t1.num = t2.num AND t2.wert = > "xxx") - values ok' > # at t/16morejoins.t line 292. > # got: ''3','c','3','yyy'' > # expected: ''3','c',,' > > # Failed test 'Left Joins (using ON t1.num = t2.num WHERE (t2.wert = > "xxx" OR t2.wert IS NULL)) - values ok' > # at t/16morejoins.t line 319. > # got: '' > # expected: ''3','c',,' > # Looks like you failed 2 tests of 48. > t/16morejoins.t ...... Dubious, test returned 2 (wstat 512, 0x200) > Failed 2/48 subtests > t/17quoting.t ........ ok > > Test Summary Report > ------------------- > t/16morejoins.t (Wstat: 512 Tests: 48 Failed: 2) > Failed tests: 44, 48 > Non-zero exit status: 2 > Files=18, Tests=335, 10 wallclock secs ( 0.14 usr + 0.11 sys = 0.25 > CPU) > Result: FAIL > Failed 1/18 test programs. 2/335 subtests failed. > NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code > '0xff' > Stop.
Version 1.20 can't pass all tests and so can't be installed. Please see attachnmemnt for log.
Subject: cpan.log
Download cpan.log
application/octet-stream 3.3k

Message body not shown because it is not plain text.

Subject: Version 1.20 can't pass all tests and so can't be installed.
It's the same bug as RT #42676 - and it'll be fixed in the next release. Sorry that it takes a while, but the current changes are more complicated than expected.
Subject: tests 16 failed
It's the same bug as RT #42676 - and it'll be fixed in the next release. Sorry that it takes a while, but the current changes are more complicated than expected.
Fixed with many thanks to H.Merijn Brand