From: Brandon Black Date: Thu, 12 Oct 2006 14:53:18 +0000 (+0000) Subject: apply fixes from rt.cpan.org #21758 X-Git-Tag: 0.03008~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9d5f2ccc923f12754e6e27dc98fd4a43abbd0e8a;p=dbsrgits%2FDBIx-Class-Schema-Loader.git apply fixes from rt.cpan.org #21758 --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm index 93fadad..7d4afca 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm @@ -31,7 +31,7 @@ sub _table_fk_info { my ($self, $table) = @_; my $dbh = $self->schema->storage->dbh; - my $table_def_ref = $dbh->selectrow_arrayref("SHOW CREATE TABLE $table") + my $table_def_ref = $dbh->selectrow_arrayref("SHOW CREATE TABLE `$table`") or croak ("Cannot get table definition for $table"); my $table_def = $table_def_ref->[1] || ''; @@ -67,7 +67,7 @@ sub _mysql_table_get_keys { if(!exists($self->{_cache}->{_mysql_keys}->{$table})) { my %keydata; my $dbh = $self->schema->storage->dbh; - my $sth = $dbh->prepare("SHOW INDEX FROM $table"); + my $sth = $dbh->prepare("SHOW INDEX FROM `$table`"); $sth->execute; while(my $row = $sth->fetchrow_hashref) { next if $row->{Non_unique};