Bug #43262

Prevent statements with count() and order by parts for PostgrSQL

Added by Nicole Cordes almost 8 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2012-11-24
Due date:
% Done:

100%

TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In PostgreSQL it is not allowed to use a COUNT statement with an ORDER BY statement as long as the field for sorting not available in GROUP BY clause. Therefor we have to parse the SQL and drop ORDER BY clause for selections with a count.

IMHO this is an important fix as otherwise it is not possible the use all the features from extbase. I got an error while using the Backend user extension provided by the current master.

Associated revisions

Revision 3f7b0e61 (diff)
Added by Anja Leichsenring over 5 years ago

[BUGFIX] Prevent statements with COUNT and ORDER BY parts for PostgreSQL

In PostgreSQL it's not allowed to use a COUNT statement with an ORDER BY
statement as long as the field for sorting not available in GROUP BY
clause. Therefor we have to parse the SQL and drop ORDER BY clause for
selections with a count.

Resolves: #43262
Releases: master
Change-Id: I30cedfa2c25a5b2a8c6f7cb56c2dd2bc28e185ec
Reviewed-on: http://review.typo3.org/21091
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Morton Jonuschat <>
Tested-by: Morton Jonuschat <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review almost 8 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16704

#2 Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21091

#3 Updated by Michael Stucki almost 7 years ago

  • Category deleted (PostgreSQL)

#4 Updated by Michael Stucki almost 7 years ago

  • Project changed from DBAL to TYPO3 Core

#5 Updated by Michael Stucki almost 7 years ago

  • Category set to 999

#6 Updated by Mathias Schreiber over 5 years ago

  • Target version changed from 6.0.0 to 8 LTS
  • Is Regression set to No

#7 Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/21091

#8 Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/21091

#9 Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/21091

#10 Updated by Gerrit Code Review over 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/21091

#11 Updated by Gerrit Code Review over 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/21091

#12 Updated by Gerrit Code Review over 5 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/21091

#13 Updated by Gerrit Code Review over 5 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/21091

#14 Updated by Gerrit Code Review over 5 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/21091

#15 Updated by Anja Leichsenring over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#16 Updated by Riccardo De Contardi about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF