Review main Merged

48461[BUGFIX] Introduce exception for using offset without limit

Ian SEBBAGH CR +2 V +2 Easy +38 −0 updated 06/07/16, 10:16

Commit message

In Typo3DbBackend::createQueryCommandParametersFromStatementParts,
if an offset is defined, but no limit is, an LogicException is thrown.

SQL does not provide possibility to set offset without limit.
To retrieve all rows from a certain offset up to the end of the
result set, you can use some large number for the limit.
See: http://dev.mysql.com/doc/refman/5.7/en/select.html

Review

  • Code review CR +2
    • Jan Helke +2
    • Wouter Wolters +1
    • Anja Leichsenring +1
    • Jörg Bösche +1
    • Andreas Kienast +1
    • Susi Moog +1
  • Verified V +2
    • Jan Helke +2
    • Anja Leichsenring +1
    • Jörg Bösche +1
    • Susi Moog +1

Issues 1

Files 2

Review log 25

  1. Ian SEBBAGH uploaded patch set 1 06/06/16, 15:51

  2. Andreas Kienast commented on patch set 1 CR -1 06/06/16, 15:55

    IMO a breaking change and can't go into 7.6
  3. Ian SEBBAGH commented on patch set 1 06/06/16, 16:28

    Without the exception introduced, we got a sql error anyway, so it will not break more than before.
  4. Andreas Kienast voted on patch set 1 CR 0 06/06/16, 16:36

  5. Ian SEBBAGH uploaded patch set 2 06/06/16, 16:51

  6. Andreas Kienast voted on patch set 2 CR +1 06/06/16, 16:53

  7. Jörg Bösche commented on patch set 2 CR -1 06/06/16, 17:21

    Typo3DbBackend.php:366

    Should be an InvalidArgument exception. The InvalidArgumentException is a subclass of LogicException. Also the statementParts are kind of arguments for the sql statement.
  8. Susi Moog commented on patch set 2 06/06/16, 17:22

    Did we really get an SQL error before or didn't the function just assume offset = limit and work as if a limit was given? Therefor still delivering results? the latter would mean this actually is breaking, even though it worked by "blind luck" before.
  9. Ian SEBBAGH commented on patch set 2 06/06/16, 17:33

    Before introducing the exception we got "LIMIT [offset],": the comma breaking the sql request.
  10. Ian SEBBAGH uploaded patch set 3 06/06/16, 18:09

  11. Wouter Wolters commented on patch set 3 CR -1 06/06/16, 19:01

    Use native invalid argument exception instead

    Typo3DbBackend.php:367

    this is the wrong exception. This is located in ext:install. that does not belong here.
  12. Ian SEBBAGH uploaded patch set 4 06/07/16, 07:39

  13. Susi Moog uploaded patch set 5 06/07/16, 08:25

  14. Susi Moog commented on patch set 5 CR +1 V +1 06/07/16, 08:26

    Just added a unit test.
  15. Ian SEBBAGH uploaded patch set 6 06/07/16, 09:23

  16. Wouter Wolters voted on patch set 6 CR +1 06/07/16, 09:25

  17. Ian SEBBAGH commented on patch set 6 06/07/16, 09:26

    Added the @throws
  18. Susi Moog voted on patch set 6 CR +1 V +1 06/07/16, 09:29

  19. Andreas Kienast voted on patch set 6 CR +1 06/07/16, 09:56

  20. Anja Leichsenring voted on patch set 6 CR +1 V +1 06/07/16, 10:14

  21. Jörg Bösche voted on patch set 6 CR +1 V +1 06/07/16, 10:15

  22. Jan Helke voted on patch set 6 CR +1 V +1 06/07/16, 10:15

  23. Jan Helke voted on patch set 6 CR +2 V +2 06/07/16, 10:15

  24. Gerrit merged patch set 6 06/07/16, 10:16

  25. Jan Helke commented on patch set 7 06/07/16, 10:16

    Cherry Picked This patchset was cherry picked to branch TYPO3_7-6 as commit 145bb6ce17848affc6e371b5191d7588db731d6c