From: Peter Rabbitson Date: Thu, 29 Mar 2012 02:53:28 +0000 (+0200) Subject: Always reselect a bind-containing order by even if appearing in the select list X-Git-Tag: v0.08197~37^2~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f1be7448b27b02525ddd237e0371cef887a54a9e;p=dbsrgits%2FDBIx-Class.git Always reselect a bind-containing order by even if appearing in the select list --- diff --git a/lib/DBIx/Class/SQLMaker/LimitDialects.pm b/lib/DBIx/Class/SQLMaker/LimitDialects.pm index 1c16805..e91a0c5 100644 --- a/lib/DBIx/Class/SQLMaker/LimitDialects.pm +++ b/lib/DBIx/Class/SQLMaker/LimitDialects.pm @@ -717,7 +717,9 @@ sub _subqueried_limit_attrs { , }; - $in_sel_index->{$sql_sel}++; + # anything with a placeholder in it needs re-selection + $in_sel_index->{$sql_sel}++ unless $sql_sel =~ / (?: ^ | \W ) \? (?: \W | $ ) /x; + $in_sel_index->{$self->_quote ($sql_alias)}++ if $sql_alias; # record unqualified versions too, so we do not have