Review main Merged

54281[BUGFIX] Do not GROUP BY alias in WorkspaceService

Susi Moog CR +2 V +2 Easy +1 −1 updated 10/06/17, 10:38

Commit message

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.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Benni Mack +2
    • Wouter Wolters +1
    • Jörg Bösche +1
    • Andreas Kienast +1
    • Oliver Hader +1
  • Verified V +2
    • Christian Kuhn +2
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1617

  1. Susi Moog uploaded patch set 1 10/04/17, 07:45

  2. Benni Mack voted on patch set 1 CR +1 10/04/17, 07:49

  3. Wouter Wolters voted on patch set 1 CR +1 10/04/17, 07:54

  4. Tymoteusz Motylewski commented on patch set 1 10/04/17, 07:55

    any hints how to test it?
  5. TYPO3com voted on patch set 1 V +1 10/04/17, 07:57 Completed build in 12m 22s on Wed, 4 Oct, 09:57 AM Test Summary: 56764 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15326

  6. Susi Moog commented on patch set 1 10/04/17, 07:58

    @Tymek: with MSSQL it's easy: before patch: SQL error on pagetree loading, with patch: no error, working pagetree.
  7. Oliver Hader commented on patch set 1 10/04/17, 08:28

    WorkspaceService.php:1061

    Since the alias cannot be used, it can be removed from the select part as well
  8. Susi Moog commented on patch set 1 10/04/17, 08:31

    WorkspaceService.php:1061 Reply

    it's used as array accessor below, that's why I kept it, because it's more speaking.
  9. Oliver Hader commented on patch set 1 10/04/17, 08:32

    We could have functional tests for methods hasPageRecordVersions and getPagesWithVersionsInTable to check that for all configured DBMS in Bamboo
  10. Susi Moog commented on patch set 1 10/04/17, 09:02

    yes, we could (as for all queries) but sadly it would not have helped in this case, as we don't have oracle tests at all and mssql is currently disabled.
  11. Oliver Hader voted on patch set 1 CR +1 10/04/17, 09:29

  12. Andreas Kienast voted on patch set 1 CR +1 10/04/17, 10:25

  13. Jörg Bösche voted on patch set 1 CR +1 10/05/17, 06:02

  14. Benni Mack commented on patch set 1 CR +2 V +1 10/05/17, 06:04

    works with MySQL as before.
  15. Christian Kuhn voted on patch set 1 CR +2 V +2 10/06/17, 10:37

  16. Gerrit merged patch set 1 10/06/17, 10:37

  17. Christian Kuhn commented on patch set 2 10/06/17, 10:38

    Cherry Picked This patchset was cherry picked to branch TYPO3_8-7 as commit d215949bf903dc3a5c13fa44a933e779d861a8eb