Bug #103427
closedDatabaseRecordList::getTables() generates an invalid `COUNT()` query in some cirumstances
100%
Description
\TYPO3\CMS\Backend\RecordList\DatabaseRecordList
provides the ability
to modify the QueryBuilder used for the record list representation with
the PSR-14 ModifyDatabaseQueryForRecordListingEvent
, after generic
query informations like default orderings and similar has been added.
That is coverd within the `getQueryBuilder()` method, which is used in
other class methods, for example in `getTables()` where it is changed
to a `COUNT` query.
MariaDB for example is picky about count queries using `order by`,
`group by` or aggretation methods which are not reflected or added
in the counter parts leading to a not so use-full error like
Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
or similar variants.
This may be adjusted to some extend with server configurations, but
cannot be expected. TYPO3 core must generate valid queries valid
for all database vendor and flavours.
Building up a generic `SELECT` query and reusing it as simple `COUNT`
query requires to avoid the `ORDER BY` and `GROUP BY` and needs to
be removed. Other places throughout the TYPO3 core already does this.
An exception occurred while executing ' SELECT COUNT(*) FROM `static_countries` WHERE (`static_countries`.`pid` = ?) AND (`static_countries`.`deleted` = 0) ORDER BY `cn_short_de` ASC LIMIT 1 ' with params [14516]: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
Updated by Gerrit Code Review 8 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83523
Updated by Gerrit Code Review 8 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83523
Updated by Gerrit Code Review 8 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83532
Updated by Gerrit Code Review 8 months ago
Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83532
Updated by Gerrit Code Review 8 months ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83524
Updated by Gerrit Code Review 8 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83523
Updated by Gerrit Code Review 8 months ago
Patch set 3 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83532
Updated by Gerrit Code Review 8 months ago
Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83524
Updated by Gerrit Code Review 8 months ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83523
Updated by Gerrit Code Review 8 months ago
Patch set 4 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83532
Updated by Gerrit Code Review 8 months ago
Patch set 3 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83524
Updated by Gerrit Code Review 8 months ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83523
Updated by Gerrit Code Review 8 months ago
Patch set 5 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83532
Updated by Gerrit Code Review 8 months ago
Patch set 4 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83524
Updated by Stefan Bürk 8 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d5478c928a13ed81563b900f652b2b65b24e26dc.