Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 107852
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

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



Subject: t/105view_deps.t tests fails since SQLite-3.9.0
Download (untitled) / with headers
text/plain 1.9k
After upgrading SQLite from 3.8.11.1 to 3.9.0, t/105view_deps.t tests fails like this: $ prove -l -v t/105view_deps.t t/105view_deps.t .. # ok 1 - use DBIx::Class::ResultSource::View; ok 2 - 'A new view' isa 'DBIx::Class::ResultSource' ok 3 - 'A new view also' isa 'DBIx::Class' ok 4 - DBIx::Class::ResultSource::View->can('new') ok 5 - DBIx::Class::ResultSource::View->can('from') ok 6 - DBIx::Class::ResultSource::View->can('deploy_depends_on') ok 7 - Connected to ViewDeps schema OK ok 8 - SQLT view order triumphantly matches our order. ok 9 - Query on TrackNumberFives succeeds ok 10 - Query on AbaNameArtists succeeds ok 11 - Query on Year2010CDsWithManyTracks succeeds ok 12 - Query on AbNameArtists succeeds ok 13 - Query on ANameArtists succeeds ok 14 - Query on Year2010CDs succeeds ok 15 - Query on AbaNameArtistsAnd2010CDsWithManyTracks succeeds ok 16 - Connected to ViewDepsBad schema OK not ok 17 - Deploying the bad schema produces a warning: aba_name_artists was not created. ok 18 - SQLT view order triumphantly matches our order. ok 19 - Query on AbNameArtists succeeds ok 20 - Query on Year2010CDsWithManyTracks succeeds ok 21 - Query on TrackNumberFives succeeds ok 22 - Query on AbaNameArtists succeeds ok 23 - Query on Year2010CDs succeeds ok 24 - Query on ANameArtists succeeds not ok 25 - Query on AbaNameArtistsAnd2010CDsWithManyTracks throws, because the table does not exist 1..25 # Auto checked 6 references for leaks - none detected # Failed test 'Deploying the bad schema produces a warning: aba_name_artists was not created.' # at t/105view_deps.t line 79. # didn't find a warning # expected to find warning: (?^:no such table: main.aba_name_artists) # Failed test 'Query on AbaNameArtistsAnd2010CDsWithManyTracks throws, because the table does not exist' # at t/105view_deps.t line 110. # expecting: Regexp ((?^:no such table: aba_name_artists_and_2010_cds_with_many_tracks)) # found: normal exit # Looks like you failed 2 tests of 25. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/25 subtests
Subject: Re: [rt.cpan.org #107852] t/105view_deps.t tests fails since SQLite-3.9.0
Date: Mon, 19 Oct 2015 12:53:04 +0200
To: bug-DBIx-Class [...] rt.cpan.org
From: Peter Rabbitson <ribasushi [...] cpan.org>
Download (untitled) / with headers
text/plain 1.5k
On 10/19/2015 11:33 AM, Petr Pisar via RT wrote: Show quoted text
> Mon Oct 19 05:33:56 2015: Request 107852 was acted upon. > Transaction: Ticket created by ppisar > Queue: DBIx-Class > Subject: t/105view_deps.t tests fails since SQLite-3.9.0 > Broken in: 0.082820 > Severity: (no value) > Owner: Nobody > Requestors: ppisar@redhat.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=107852 > > > > After upgrading SQLite from 3.8.11.1 to 3.9.0
Can you please get me the correct incantation how to do this? DBD::SQLite comes prebundled with the older version: ~$ perl -MDBI -MData::Dumper -e 'die Dumper [ DBI->connect("dbi:SQLite::memory:")->{sqlite_version}, DBD::SQLite->VERSION]' $VAR1 = [ '3.8.11.1', '1.49_02' ]; Show quoted text
> # Failed test 'Deploying the bad schema produces a warning: aba_name_artists was not created.' > # at t/105view_deps.t line 79. > # didn't find a warning > # expected to find warning: (?^:no such table: main.aba_name_artists)
This one could very well be a problem with DBIC, however: Show quoted text
> > # Failed test 'Query on AbaNameArtistsAnd2010CDsWithManyTracks throws, because the table does not exist' > # at t/105view_deps.t line 110. > # expecting: Regexp ((?^:no such table: aba_name_artists_and_2010_cds_with_many_tracks)) > # found: normal exit >
This can't be right. I am inclined to blame DBD::SQLite here for not interfacing properly with 3.9.0 or something. Hence need instructions how to reproduce - an error like this should be resulting in an exception.
Subject: Re: [rt.cpan.org #107852] t/105view_deps.t tests fails since SQLite-3.9.0
Date: Mon, 19 Oct 2015 13:25:10 +0200
To: Peter Rabbitson via RT <bug-DBIx-Class [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
Download (untitled) / with headers
text/plain 1.6k
On Mon, Oct 19, 2015 at 06:53:33AM -0400, Peter Rabbitson via RT wrote: Show quoted text
> > After upgrading SQLite from 3.8.11.1 to 3.9.0
> > Can you please get me the correct incantation how to do this? > DBD::SQLite comes prebundled with the older version: > > > ~$ perl -MDBI -MData::Dumper -e 'die Dumper [ > DBI->connect("dbi:SQLite::memory:")->{sqlite_version}, > DBD::SQLite->VERSION]' > $VAR1 = [ > '3.8.11.1', > '1.49_02' > ]; >
$VAR1 = [ '3.9.0', '1.48' ]; We build DBD::SQLite against system SQLite library, see <http://pkgs.fedoraproject.org/cgit/perl-DBD-SQLite.git/tree/perl-DBD-SQLite.spec> (the patches are in the same directory). Show quoted text
> > # Failed test 'Deploying the bad schema produces a warning: aba_name_artists was not created.' > > # at t/105view_deps.t line 79. > > # didn't find a warning > > # expected to find warning: (?^:no such table: main.aba_name_artists)
> > This one could very well be a problem with DBIC, however: >
> > > > # Failed test 'Query on AbaNameArtistsAnd2010CDsWithManyTracks throws, because the table does not exist' > > # at t/105view_deps.t line 110. > > # expecting: Regexp ((?^:no such table: aba_name_artists_and_2010_cds_with_many_tracks)) > > # found: normal exit > >
> > This can't be right. I am inclined to blame DBD::SQLite here for not > interfacing properly with 3.9.0 or something. Hence need instructions > how to reproduce - an error like this should be resulting in an exception. >
That's quite possible. I will try to rebuild the DBD::SQLite and bisect SQLite to find what exact SQLite change causes the failure. -- Petr
Download signature.asc
application/pgp-signature 213b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #107852] t/105view_deps.t tests fails since SQLite-3.9.0
Date: Mon, 19 Oct 2015 14:57:53 +0200
To: Peter Rabbitson via RT <bug-DBIx-Class [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
Download (untitled) / with headers
text/plain 674b
On Mon, Oct 19, 2015 at 06:53:33AM -0400, Peter Rabbitson via RT wrote: Show quoted text
> On 10/19/2015 11:33 AM, Petr Pisar via RT wrote:
> > After upgrading SQLite from 3.8.11.1 to 3.9.0
> > Can you please get me the correct incantation how to do this? > DBD::SQLite comes prebundled with the older version: > > > ~$ perl -MDBI -MData::Dumper -e 'die Dumper [ > DBI->connect("dbi:SQLite::memory:")->{sqlite_version}, > DBD::SQLite->VERSION]' > $VAR1 = [ > '3.8.11.1', > '1.49_02' > ]; >
DBD::SQLite developmental code <https://github.com/DBD-SQLite/DBD-SQLite.git> already bundles SQLite-3.9.1. It can be used to reproduce the test failure. -- Petr
Download signature.asc
application/pgp-signature 213b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #107852] t/105view_deps.t tests fails since SQLite-3.9.0
Date: Mon, 19 Oct 2015 16:00:45 +0200
To: Peter Rabbitson via RT <bug-DBIx-Class [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
Download (untitled) / with headers
text/plain 2.9k
On Mon, Oct 19, 2015 at 01:25:10PM +0200, Petr Pisar wrote: Show quoted text
> On Mon, Oct 19, 2015 at 06:53:33AM -0400, Peter Rabbitson via RT wrote:
> > > # Failed test 'Deploying the bad schema produces a warning: aba_name_artists was not created.' > > > # at t/105view_deps.t line 79. > > > # didn't find a warning > > > # expected to find warning: (?^:no such table: main.aba_name_artists)
> > > > This one could very well be a problem with DBIC, however: > >
> > > > > > # Failed test 'Query on AbaNameArtistsAnd2010CDsWithManyTracks throws, because the table does not exist' > > > # at t/105view_deps.t line 110. > > > # expecting: Regexp ((?^:no such table: aba_name_artists_and_2010_cds_with_many_tracks)) > > > # found: normal exit > > >
> > > > This can't be right. I am inclined to blame DBD::SQLite here for not > > interfacing properly with 3.9.0 or something. Hence need instructions > > how to reproduce - an error like this should be resulting in an exception. > >
> That's quite possible. I will try to rebuild the DBD::SQLite and bisect SQLite > to find what exact SQLite change causes the failure. >
This SQLite commit (https://github.com/mackyle/sqlite.git) introduced the test failure: From e0a6da52a654f3ddcfef8a0c4e9c4f2fe2fd12f5 Mon Sep 17 00:00:00 2001 From: "D. Richard Hipp" <drh@hwaci.com> Date: Mon, 3 Aug 2015 13:44:45 +0000 Subject: [PATCH] Allow a VIEW to reference undefined tables and functions when initially created. The error report is deferred until the VIEW is used. This allows views to be created before subviews and tables that the view references. --- src/build.c | 3 --- test/view.test | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/build.c b/src/build.c index 2936805..a84aa57 100644 --- a/src/build.c +++ b/src/build.c @@ -2088,9 +2088,6 @@ void sqlite3CreateView( if( db->mallocFailed ){ return; } - if( !db->init.busy ){ - sqlite3ViewGetColumnNames(pParse, p); - } /* Locate the end of the CREATE VIEW statement. Make sEnd point to ** the end. diff --git a/test/view.test b/test/view.test index 3ba6c0b..a5fe85e 100644 --- a/test/view.test +++ b/test/view.test @@ -599,7 +599,7 @@ do_test view-21.1 { CREATE VIEW v8192 AS SELECT * FROM v4096 UNION SELECT * FROM v4096; CREATE VIEW v16384 AS SELECT * FROM v8192 UNION SELECT * FROM v8192; CREATE VIEW v32768 AS SELECT * FROM v16384 UNION SELECT * FROM v16384; - CREATE VIEW vx AS SELECT * FROM v32768 UNION SELECT * FROM v32768; + SELECT * FROM v32768 UNION SELECT * FROM v32768; } } {1 {too many references to "v1": max 65535}} ifcapable progress { -- 2.6.2 If I revert the change on top of SQLite-3.9.0, the DBIx::Class test passes again. It looks like an intentional change and it explains why the first test cannot see any warning. But the second test should see an error. I also think DBD::SQLite should raise an error there. If it is so, can you move this ticket to DBD-SQLite queue? -- Petr
Download signature.asc
application/pgp-signature 213b

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 494b
On Mon Oct 19 11:33:56 2015, ppisar wrote: Show quoted text
> > # Failed test 'Query on AbaNameArtistsAnd2010CDsWithManyTracks > throws, because the table does not exist'
I see what happened. The actual text here is misleading. We are not checking if an underlying *table* doesn't exist, but merely that the *view* did not get deployed. Hence my confusion. This is definitely a DBIC-side problem, now addressed to check for the right thing in https://github.com/dbsrgits/dbix-class/commit/26c663f1 Thanks!
Subject: Re: [rt.cpan.org #107852] t/105view_deps.t tests fails since SQLite-3.9.0
Date: Tue, 3 Nov 2015 16:06:03 +0100
To: Peter Rabbitson via RT <bug-DBIx-Class [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
Download (untitled) / with headers
text/plain 702b
On Tue, Nov 03, 2015 at 08:39:59AM -0500, Peter Rabbitson via RT wrote: Show quoted text
> On Mon Oct 19 11:33:56 2015, ppisar wrote:
> > > > # Failed test 'Query on AbaNameArtistsAnd2010CDsWithManyTracks > > throws, because the table does not exist'
> > I see what happened. The actual text here is misleading. We are not checking > if an underlying *table* doesn't exist, but merely that the *view* did not > get deployed. Hence my confusion. > > This is definitely a DBIC-side problem, now addressed to check for the right > thing in https://github.com/dbsrgits/dbix-class/commit/26c663f1 >
Thank you for the fix. I confirm that adjusting the test as shown in the commit makes the test passing again. -- Petr
Download signature.asc
application/pgp-signature 213b

Message body not shown because it is not plain text.

Now on CPAN


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.