Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 42841
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: notbenh [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



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
Download (untitled) / with headers
text/plain 449b
On Tue Jan 27 16:39:42 2009, NOTBENH wrote: Show quoted text
> It looks like everywhere else table names are quoted. >
This patch is inherently wrong as '`' is not a universal quotation character and because we do not always want to quote what we pass as table (hint: scalarrefs). Also right _above_ the line you patched you have: $table = $self->_quote($table) unless ref($table); Can you show an example of code that apparently suffers from lack of quotation?
No reply from reporter - stalling.
Likely a bogus request, rejecting. Feel free to reopen if problem persists.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.