Project

General

Profile

Actions

Bug #65789

closed

Extbase: Wrong SQL statement when using Offset and no Limit

Added by Eric no-lastname-given over 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Extbase
Start date:
2015-03-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

Description

When building a query with OFFSET but no LIMIT, this line in

TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend

protected function createQueryCommandParametersFromStatementParts(array $statementParts):

321:  'limit' => ($statementParts['offset'] ? $statementParts['offset'] . ', ' : '')
322:     . ($statementParts['limit'] ? $statementParts['limit'] : '')

produces an SQL Error, because the SQL ends with a comma: ...DESC LIMIT 3,

It should only add a comma, when there is a OFFSET and a LIMIT

Actions

Also available in: Atom PDF