Ticket #1262 (closed defect: fixed)
Missing identifier quoting in join condition
Description (last modified by mm) (diff)
Missing identifier quoting (when it's on Doctrine::ATTR_QUOTE_IDENTIFIER) in join condition affects query behavior. In real example, at building limit subquery table alias cannot be found (because missing quoting) and replaced for correct one, we have condition from top query to the deepest one, exec time jump from 0.94 ms to few minutes (with possible wrong results). Occur only with limit in query.
Db: PostgreSQL 8.3.3 Doctrine: 0.11
Actual (replace problem) Doctrine_Query line: 1338
$match => '"f2"."date"' $replace => '"f4"."date"' $subject => 'f2.date' $result => 'f2.date'
Expected:
$match => '"f2"."date"' $replace => '"f4"."date"' $subject => '"f2"."date"' $result => '"f4"."date"'
Reason, class Doctrine_Query_JoinCondition line: 142
. $alias . '.' . $field
Patch
. $conn->quoteIdentifier($alias . '.' . $field)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.