From: Ash Berlin Date: Sun, 4 Feb 2007 15:20:47 +0000 (+0000) Subject: Fixed quoting problem in _table_columns X-Git-Tag: 0.03010~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a0cc2498ec2d8a8db496bfbc7004ae8a54ac53a1;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Fixed quoting problem in _table_columns --- diff --git a/Changes b/Changes index d47866c..0e6f83f 100644 --- a/Changes +++ b/Changes @@ -1,8 +1,11 @@ Revision history for Perl extension DBIx::Class::Schema::Loader + - Fixed quoting problem in _table_columns (could cause crash when + dumping/doing a static create) (from ash) + 0.03009 Wed Nov 15 14:03:37 UTC 2006 - - fix for rt.cpan.org #22425 (use File::Spec where appropriate) - - use full instead of short classnames in relationships (from victori) + - fix for rt.cpan.org #22425 (use File::Spec where appropriate) + - use full instead of short classnames in relationships (from victori) 0.03008 Fri Oct 20 18:08:20 UTC 2006 - fix for rt.cpan.org #21084 (dump_overwrite pathological output recursion) @@ -105,7 +108,7 @@ Revision history for Perl extension DBIx::Class::Schema::Loader 0.02007 Wed Mar 22 06:03:53 UTC 2006 - Backported Class::C3::reinitialize changes from -refactor - branch, resulting in significantly reduced load time + branch, resulting in significantly reduced load time 0.02006 Fri Mar 17 04:55:55 UTC 2006 - Fix long-standing table/col-name case bugs @@ -132,8 +135,8 @@ Revision history for Perl extension DBIx::Class::Schema::Loader 0.02005 Mon Feb 27 23:53:17 UTC 2006 - Move the external file loading to after everything else - loader does, in case people want to define, override, or - build on top of the rels. + loader does, in case people want to define, override, or + build on top of the rels. 0.02004 Mon Feb 27 23:53:17 UTC 2006 - Minor fix to debugging message for loading external files diff --git a/lib/DBIx/Class/Schema/Loader/DBI.pm b/lib/DBIx/Class/Schema/Loader/DBI.pm index 943c34f..1e133fe 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI.pm @@ -91,7 +91,7 @@ sub _table_columns { $table = $self->{db_schema} . $self->{_namesep} . $table; } - my $sth = $dbh->prepare("SELECT * FROM $table WHERE 1=0"); + my $sth = $dbh->prepare($self->schema->storage->sql_maker->select($table, undef, \'1 = 0')); $sth->execute; return \@{$sth->{NAME_lc}}; }