Review main Merged

74373[BUGFIX] Avoid unreliable 'rowCount()' in RedirectRepository

Stefan Bürk CR +2 V +2 Easy +1 −1 updated 04/22/22, 17:47

Commit message

rowCount() on result sets for SELECT queries are not reliable
across all dbmns, which doctrine/dbal comments in the docblock.
See: https://github.com/doctrine/dbal/blob/110ab1387f11ca08dd510850d1f45bc6e79c74bb/src/Driver/Result.php#L77

Because of "rowCount()"'s unreliable behaviour for some dbms like
sqlite, this should be avoided to ensure cross dbms support.

This patch mitigate this with a simple COUNT() query replacement
in '\TYPO3\CMS\Redirects\Repository\RedirectRepository' for the
"ext:redirects", as this can be done without greater API changes.

Other occurrences will be mitigated with dedicated patches and the
proper suitable solution for the corresponding case.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1116

  1. Stefan Bürk uploaded patch set 1 04/22/22, 15:22

  2. Stefan Bürk updated the commit message in patch set 2 04/22/22, 15:23

  3. core-ci voted on patch set 2 V +1 04/22/22, 15:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26307

  4. core-ci voted on patch set 1 V +1 04/22/22, 15:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26306

  5. Benni Mack voted on patch set 2 V +1 CR +1 04/22/22, 15:36

  6. Benni Mack updated the commit message in patch set 3 04/22/22, 15:36

  7. Benni Mack voted on patch set 3 V +1 CR +1 04/22/22, 15:36

  8. core-ci voted on patch set 3 V +1 04/22/22, 15:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26308

  9. Stefan Bürk updated the commit message in patch set 4 04/22/22, 15:54

  10. core-ci voted on patch set 4 V +1 04/22/22, 16:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26309

  11. Benni Mack wrote 04/22/22, 16:51

    Removed reviewer core-ci with the following votes: * Verified+1 by core-ci
  12. Benni Mack voted on patch set 4 V +1 CR +1 04/22/22, 16:51

  13. Oli Bartsch voted on patch set 4 V +1 CR +1 04/22/22, 17:26

  14. core-ci voted on patch set 4 V +1 04/22/22, 17:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26309

  15. Oli Bartsch voted on patch set 4 V +2 CR +2 04/22/22, 17:47

  16. Oli Bartsch merged patch set 5 04/22/22, 17:47