Skip to content

Commit

Permalink
fixed compat problems w/ DBD::mysql 4.002+, bumped version to 0.03010…
Browse files Browse the repository at this point in the history
… for release
  • Loading branch information
blblack committed Mar 29, 2007
1 parent a0cc249 commit 518472f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Revision history for Perl extension DBIx::Class::Schema::Loader

0.03010 Thu Mar 29 12:36:19 UTC 2007
- Workaround for new incompatible changes in DBD::mysql's "tables"
method, which was causing us to find no tables w/ DBD::mysql
4.002+
- Fixed quoting problem in _table_columns (could cause crash when
dumping/doing a static create) (from ash)

Expand Down
2 changes: 1 addition & 1 deletion lib/DBIx/Class/Schema/Loader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use Scalar::Util qw/ weaken /;
# Always remember to do all digits for the version even if they're 0
# i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports
# brain damage and presumably various other packaging systems too
our $VERSION = '0.03009';
our $VERSION = '0.03010';

__PACKAGE__->mk_classaccessor('dump_to_dir');
__PACKAGE__->mk_classaccessor('loader');
Expand Down
16 changes: 16 additions & 0 deletions lib/DBIx/Class/Schema/Loader/DBI/mysql.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ See L<DBIx::Class::Schema::Loader::Base>.
=cut

# had to override here because MySQL apparently
# doesn't support '%' syntax. Perhaps the other
# drivers support this syntax also, but I didn't
# want to risk breaking some esoteric DBD::foo version
# in a maint release...
sub _tables_list {
my $self = shift;

my $dbh = $self->schema->storage->dbh;
my @tables = $dbh->tables(undef, $self->db_schema, undef, undef);
s/\Q$self->{_quoter}\E//g for @tables;
s/^.*\Q$self->{_namesep}\E// for @tables;

return @tables;
}

sub _table_fk_info {
my ($self, $table) = @_;

Expand Down

0 comments on commit 518472f

Please sign in to comment.