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 :))