Skip Menu |
 

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

Report information
The Basics
Id: 59619
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: qalexx [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.08123
Fixed in: 0.08124



Subject: DBIx::Class::Schema::Versioned _source_exists fails with 'quote_char' => '"' set
Download (untitled) / with headers
text/plain 558b
A problem is in DBIx::Class::Schema::Versioned Private function _source_exists does not work with postgresql if connect_info includes 'quote_char' => '"'. $rs->search({ 1, 0 })->count at line 728 results in SQL request "SELECT COUNT( * ) FROM "dbix_class_schema_versions" "me" WHERE ( "1" = ? )" with ParamValues: 1='0' and DBD::Pg raises exception DBI Exception: DBD::Pg::st execute failed: ERROR: column "1" does not exist Suggested solution: use something like $rs->search(undef, { where => \"1=0" })->count instead of $rs->search({ 1, 0 })->count
Download (untitled) / with headers
text/plain 862b
On Thu Jul 22 09:02:02 2010, http://lattenwald.blogspot.com/ wrote: Show quoted text
> A problem is in DBIx::Class::Schema::Versioned > > Private function _source_exists does not work with postgresql if > connect_info includes 'quote_char' => '"'. > > $rs->search({ 1, 0 })->count > at line 728 results in SQL request > "SELECT COUNT( * ) FROM "dbix_class_schema_versions" "me" WHERE ( "1" > = ? )" with ParamValues: 1='0' > and DBD::Pg raises exception > DBI Exception: DBD::Pg::st execute failed: ERROR: column "1" does not > exist >
Fixed: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class.git;a=commitdiff;h=a6ef2213326ba49a7735c37f034f406c9780b99d Show quoted text
> Suggested solution: > use something like > $rs->search(undef, { where => \"1=0" })->count > instead of > $rs->search({ 1, 0 })->count
Please note that using where this way is discouraged. Thanks


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.