[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>
Showing
- typo3/sysext/dbal/Classes/Database/DatabaseConnection.php 3 additions, 0 deletionstypo3/sysext/dbal/Classes/Database/DatabaseConnection.php
- typo3/sysext/dbal/Classes/Database/Specifics/AbstractSpecifics.php 13 additions, 0 deletions...ext/dbal/Classes/Database/Specifics/AbstractSpecifics.php
- typo3/sysext/dbal/Classes/Database/Specifics/PostgresSpecifics.php 36 additions, 0 deletions...ext/dbal/Classes/Database/Specifics/PostgresSpecifics.php
- typo3/sysext/dbal/Tests/Unit/Database/DatabaseConnectionPostgresqlTest.php 49 additions, 0 deletions.../Tests/Unit/Database/DatabaseConnectionPostgresqlTest.php
- typo3/sysext/dbal/Tests/Unit/Database/DatabaseConnectionTest.php 3 additions, 0 deletions...ysext/dbal/Tests/Unit/Database/DatabaseConnectionTest.php
Please register or sign in to comment