diff --git a/Changes b/Changes index 0e6f83f09..d57880365 100644 --- a/Changes +++ b/Changes @@ -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) diff --git a/lib/DBIx/Class/Schema/Loader.pm b/lib/DBIx/Class/Schema/Loader.pm index 03a8cce42..eb79ca261 100644 --- a/lib/DBIx/Class/Schema/Loader.pm +++ b/lib/DBIx/Class/Schema/Loader.pm @@ -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'); diff --git a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm index 7d4afca6c..c7e7923fe 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm @@ -27,6 +27,22 @@ See L. =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) = @_;