Skip Menu |

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

Report information
The Basics
Id: 39625
Status: resolved
Priority: 0/
Queue: DBIx-Class-Schema-Loader

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

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



Subject: DB2: table list generation fails
When specifying db_schema, _tables_list() should only return tables defined (or aliased, etc) in the given schema. _tables_list() in DBIx::Class::Schema::Loader::DBI uses my @tables = $dbh->tables(undef, $self->db_schema, '%', '%'); to collect the list of tables. However, DBD::DB2 seems to have implemented it in a slightly different fashion *sigh*, and the above appears to return all tables in all schemas. This function should be overridden in DBIx::Class::Schema::Loader::DBI::DB2, changing the above line to something along the lines of: my @tables = $dbh->tables({ TABLE_SCHEM => $self->db_schema }); (again, critical as this basically makes it impossible to use db_schema with DB2, but then, I probably suffer from "my bugs are the most important" syndrome :))
Subject: Re: [rt.cpan.org #39625] DB2: table list generation fails
Date: Sat, 27 Sep 2008 19:50:27 +0100
To: Chris Weyl via RT <bug-DBIx-Class-Schema-Loader [...] rt.cpan.org>
From: Matt S Trout <mst [...] shadowcat.co.uk>
On Thu, Sep 25, 2008 at 10:06:31PM -0400, Chris Weyl via RT wrote: Show quoted text
> Thu Sep 25 22:06:30 2008: Request 39625 was acted upon. > Transaction: Ticket created by RSRCHBOY > Queue: DBIx-Class-Schema-Loader > Subject: DB2: table list generation fails > Broken in: 0.04005 > Severity: Critical > Owner: Nobody > Requestors: rsrchboy@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=39625 > > > > When specifying db_schema, _tables_list() should only return tables > defined (or aliased, etc) in the given schema. _tables_list() in > DBIx::Class::Schema::Loader::DBI uses > > my @tables = $dbh->tables(undef, $self->db_schema, '%', '%'); > > to collect the list of tables. However, DBD::DB2 seems to have > implemented it in a slightly different fashion *sigh*, and the above > appears to return all tables in all schemas. > > This function should be overridden in > DBIx::Class::Schema::Loader::DBI::DB2, changing the above line to > something along the lines of: > > my @tables = $dbh->tables({ TABLE_SCHEM => $self->db_schema }); > > (again, critical as this basically makes it impossible to use db_schema > with DB2, but then, I probably suffer from "my bugs are the most > important" syndrome :))
Could we have a patch and tests then please? I don't believe ilmari has a DB2 box handy -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
Subject: Re: [rt.cpan.org #39625] DB2: table list generation fails
Date: Fri, 3 Oct 2008 15:19:20 -0700
To: bug-DBIx-Class-Schema-Loader [...] rt.cpan.org
From: "Chris Weyl" <rsrchboy [...] cpan.org>
On Sat, Sep 27, 2008 at 11:51 AM, Matt S Trout via RT <bug-DBIx-Class-Schema-Loader@rt.cpan.org> wrote: Show quoted text
> Could we have a patch and tests then please? I don't believe ilmari has > a DB2 box handy
Unfortunately, as this is something I'm working through for my Real Job, I have to take any "code" contributions through both management, and Legal for an OK. I can vouch the above change works, but I can't supply either a patch or tests until I get the OK to do so from both. -Chris -- Chris Weyl Ex astris, scientia
Seems to have been fixed in current, as of at least 0.06001 .