[BUGFIX] Prevent statements with COUNT() and ORDER BY parts for PostgreSQL 91/21091/10
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 4 Apr 2015 15:51:45 +0000 (17:51 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 18 Jul 2015 14:11:30 +0000 (16:11 +0200)
commit3f7b0e615f4f128f81ef822852bffdf808d41255
treec0dd8d0321ae35e89b5468d527b7e4384ac3f1de
parenta1b10c5b9517fd220588def4b0d17d89210b77c4
[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 <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/dbal/Classes/Database/DatabaseConnection.php
typo3/sysext/dbal/Classes/Database/Specifics/AbstractSpecifics.php
typo3/sysext/dbal/Classes/Database/Specifics/PostgresSpecifics.php
typo3/sysext/dbal/Tests/Unit/Database/DatabaseConnectionPostgresqlTest.php
typo3/sysext/dbal/Tests/Unit/Database/DatabaseConnectionTest.php