[Bast-commits] r3147 - in trunk/DBIx-Class-Schema-Loader: . lib/DBIx/Class/Schema lib/DBIx/Class/Schema/Loader/DBI

blblack at dev.catalyst.perl.org blblack at dev.catalyst.perl.org
Thu Mar 29 14:16:31 GMT 2007


Author: blblack
Date: 2007-03-29 14:16:30 +0100 (Thu, 29 Mar 2007)
New Revision: 3147

Modified:
   trunk/DBIx-Class-Schema-Loader/Changes
   trunk/DBIx-Class-Schema-Loader/lib/DBIx/Class/Schema/Loader.pm
   trunk/DBIx-Class-Schema-Loader/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm
Log:
fixed compat problems w/ DBD::mysql 4.002+, bumped version to 0.03010 for release

Modified: trunk/DBIx-Class-Schema-Loader/Changes
===================================================================
--- trunk/DBIx-Class-Schema-Loader/Changes	2007-03-28 22:57:29 UTC (rev 3146)
+++ trunk/DBIx-Class-Schema-Loader/Changes	2007-03-29 13:16:30 UTC (rev 3147)
@@ -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)
 

Modified: trunk/DBIx-Class-Schema-Loader/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm
===================================================================
--- trunk/DBIx-Class-Schema-Loader/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm	2007-03-28 22:57:29 UTC (rev 3146)
+++ trunk/DBIx-Class-Schema-Loader/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm	2007-03-29 13:16:30 UTC (rev 3147)
@@ -27,6 +27,22 @@
 
 =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) = @_;
 

Modified: trunk/DBIx-Class-Schema-Loader/lib/DBIx/Class/Schema/Loader.pm
===================================================================
--- trunk/DBIx-Class-Schema-Loader/lib/DBIx/Class/Schema/Loader.pm	2007-03-28 22:57:29 UTC (rev 3146)
+++ trunk/DBIx-Class-Schema-Loader/lib/DBIx/Class/Schema/Loader.pm	2007-03-29 13:16:30 UTC (rev 3147)
@@ -12,7 +12,7 @@
 # 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');




More information about the Bast-commits mailing list