Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 89011
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: fschlich [...] zedat.fu-berlin.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.40
Fixed in: (no value)



Subject: Test failure in t/53_status.t: 'num of sort: 0'
Hi, I'm forwarding Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=723812 We've recently started to see a test failure for DBD-SQLite: t/53_status.t ............................... 1/? # Failed test 'num of sort: 0' # at t/53_status.t line 49. # Failed test 'num of sort: 0' # at t/53_status.t line 49. # Looks like you failed 2 tests of 16. t/53_status.t ............................... Dubious, test returned 2 # (wstat 512, 0x200) Failed 2/16 subtests Apparently, the sort counter remains 0 when no actual sorting is done, as in this test where the result set contains just one element. The attached patch expands the result set and thus fixes the build failure; but I hope you know more about what change caused this failure in the first place and whether this kind of fix is adequate. Florian NB: this is on Debian/unstable, with DBD-SQLite 1.40 and sqlite3 3.8.0.2
Subject: fix-test-sort.patch
Description: fix test failure by forcing sqlite to actually sort something Current versions of sqlite seem to not do any sorting if the result has just one element. This patch makes sure the result picks up a few more elements, so that the sort counter gets pushed above zero. Author: Florian Schlichting <fsfs@debian.org> Forwarded: --- a/t/53_status.t +++ b/t/53_status.t @@ -39,8 +39,8 @@ } { - my $sth = $dbh->prepare('select * from foo where text = ? order by text desc'); - $sth->execute("text1"); + my $sth = $dbh->prepare('select * from foo where text LIKE ? order by text desc'); + $sth->execute("text1%"); my $st_status = $sth->$func('st_status'); ok $st_status && ref $st_status eq ref {}, "st status is a hashref"; my $num_of_keys = scalar keys %$st_status;
Thanks for the report. This issue has already been addressed in 1.41_01 (with a different fix that uses "defined"). On Sat Sep 28 08:47:15 2013, fschlich wrote: Show quoted text
> Hi, > > I'm forwarding Debian bug http://bugs.debian.org/cgi- > bin/bugreport.cgi?bug=723812 > > We've recently started to see a test failure for DBD-SQLite: > > t/53_status.t ............................... 1/? > # Failed test 'num of sort: 0' > # at t/53_status.t line 49. > > # Failed test 'num of sort: 0' > # at t/53_status.t line 49. > # Looks like you failed 2 tests of 16. > t/53_status.t ............................... Dubious, test returned 2 > # (wstat 512, 0x200) > Failed 2/16 subtests > > Apparently, the sort counter remains 0 when no actual sorting is done, > as in this test where the result set contains just one element. The > attached patch expands the result set and thus fixes the build > failure; but I hope you know more about what change caused this > failure in the first place and whether this kind of fix is adequate. > > Florian > > NB: this is on Debian/unstable, with DBD-SQLite 1.40 and sqlite3 > 3.8.0.2