Subject: | Table names are not quoted for select in Storage/DBI.pm |
It looks like everywhere else table names are quoted.
--
benh~
Subject: | quote_tablename.patch |
From b6e4cd88c8ce392ada62976675fcdc4d208bf614 Mon Sep 17 00:00:00 2001
From: ben hengst <ben.hengst@gmail.com>
Date: Tue, 27 Jan 2009 13:32:19 -0800
Subject: escape tablenames in selects just like everywhere else
---
lib/DBIx/Class/Storage/DBI.pm | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm
index 874d3a4..a1e3f20 100755
--- a/lib/DBIx/Class/Storage/DBI.pm
+++ b/lib/DBIx/Class/Storage/DBI.pm
@@ -77,6 +77,7 @@ sub _find_syntax {
sub select {
my ($self, $table, $fields, $where, $order, @rest) = @_;
$table = $self->_quote($table) unless ref($table);
+ $table = sprintf q{`%s`}, $table;
local $self->{rownum_hack_count} = 1
if (defined $rest[0] && $self->{limit_dialect} eq 'RowNum');
@rest = (-1) unless defined $rest[0];
--
1.6.1