[BUGFIX] Do not GROUP BY alias in WorkspaceService 08/54308/2
authorSusanne Moog <susanne.moog@typo3.com>
Wed, 4 Oct 2017 07:39:28 +0000 (09:39 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 6 Oct 2017 10:53:22 +0000 (12:53 +0200)
GROUP BY statements are in general evaluated before
SELECT statements. If a DBMS does not implement additional
logic to resolve aliases defined in SELECTS before grouping
the statement will fail. Currently both MSSQL as well as ORACLE
lack these additional implementations. To be safe we should
group by the non-aliased columns.

Change-Id: I04698b2c31fbe2b0907fd345fbbf5e84dcebf164
Resolves: #82664
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/54308
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index f03a1c4..91a96d8 100644 (file)
@@ -1073,7 +1073,7 @@ class WorkspaceService implements SingletonInterface
                         $movePointerQueryBuilder->getSQL()
                     )
                 )
-                ->groupBy('pageId')
+                ->groupBy('B.pid')
                 ->execute();
 
             $pageIds = [];