Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .idea/doctrine1.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions .idea/php-docker-settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

221 changes: 221 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion lib/Doctrine/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,8 @@ public function getLimitSubquery()

// add driver specific limit clause
$subquery = $this->_conn->modifyLimitSubquery($table, $subquery, $this->_sqlParts['limit'], $this->_sqlParts['offset']);
// apply any outstanding indexes to the subquery before we rebuild the query parts using new Aliases
$subquery = $this->_applyIndexesToQuery($subquery);

$parts = $this->_tokenizer->quoteExplode($subquery, ' ', "'", "'");

Expand Down Expand Up @@ -1586,6 +1588,7 @@ public function getLimitSubquery()
}

$subquery = implode(' ', $parts);

return $subquery;
}

Expand Down Expand Up @@ -2112,7 +2115,7 @@ public function getCountSqlQuery()
. $this->_conn->quoteIdentifier('dctrn_count_query');
}

return $q;
return $this->_applyIndexesToQuery($q);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions lib/Doctrine/Query/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -2503,8 +2503,7 @@ protected function _applyIndexesToQuery($sql)
}
}
}
// Empty the index part array to prevent us from accidentally appending twice.
$this->_index_parts = [];

return $sql;
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/RawSql.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public function getSqlQuery($params = array())
if ( ! empty($string)) {
array_pop($this->_sqlParts['where']);
}
return $q;
return $this->_applyIndexesToQuery($q);
}

/**
Expand Down Expand Up @@ -326,7 +326,7 @@ public function getCountSqlQuery($params = array())
array_pop($this->_sqlParts['where']);
}

return $q;
return $this->_applyIndexesToQuery($q);
}

/**
Expand Down