Review main Merged

74380[BUGFIX] Avoid unreliable 'rowCount()' in IndexSearchRepository

Stefan Bürk CR +2 V +2 Easy +12 −4 updated 05/02/22, 07:55

Commit message

rowCount() on result sets for SELECT queries are not reliable across
all DBMS, which doctrine/dbal comments in the docblock. See:
https://github.com/doctrine/dbal/blob/110ab13/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.

'\TYPO3\CMS\IndexedSearch\Domain\Repository\IndexSearchRepository'
uses 'rowCount()' in 'doSearch()' which fails on sqlite, making it
impossible to get any result in the frontend search.

Doing a count() query as replacement is not possible and needs a
bigger architectural change, which is not feasable as bugfix.
Thus fallback to retrieve the result into an array and counting
the array is used as a intermediate solution to ensure index_search
is working across all supported database systems.

The architectural change will be done in a dedicated patch.

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 1029

Show 34 earlier messages
  1. Stefan Bürk uploaded patch set 1 04/23/22, 14:23

  2. Stefan Bürk wrote 04/23/22, 14:24

    Topic set to doctrine/dbal
  3. core-ci voted on patch set 1 V +1 04/23/22, 14:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26344

  4. Oliver Klee voted on patch set 1 CR +1 04/23/22, 15:17

  1. Stefan Bürk rebased onto patch set 2 04/30/22, 14:13

  2. Stefan Bürk updated the commit message in patch set 3 04/30/22, 14:20

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

  4. core-ci voted on patch set 3 V -1 04/30/22, 14:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26694

  5. Oliver Klee voted on patch set 3 CR +1 04/30/22, 14:54

  6. core-ci voted on patch set 3 V +1 04/30/22, 17:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26694

  7. core-ci commented on patch set 3 04/30/22, 19:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26700

  8. core-ci commented on patch set 3 04/30/22, 20:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26701

  9. core-ci voted on patch set 3 V -1 04/30/22, 20:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26702

  10. core-ci voted on patch set 3 V +1 04/30/22, 21:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26702

  11. core-ci commented on patch set 3 04/30/22, 21:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26703

  12. core-ci voted on patch set 3 V -1 04/30/22, 21:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26704

  13. core-ci voted on patch set 3 V +1 04/30/22, 21:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26704

  14. core-ci voted on patch set 3 V -1 04/30/22, 21:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26705

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

  16. core-ci commented on patch set 3 05/01/22, 14:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26710

  17. core-ci voted on patch set 3 V -1 05/01/22, 18:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26712

  18. core-ci voted on patch set 3 V +1 05/01/22, 18:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26713

  19. core-ci commented on patch set 3 05/01/22, 18:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26712

  20. core-ci commented on patch set 3 05/01/22, 18:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26711

  21. Benni Mack updated the commit message in patch set 4 05/02/22, 05:46

  22. core-ci voted on patch set 4 V +1 05/02/22, 05:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26719

  23. Benni Mack voted on patch set 4 V +1 CR +1 05/02/22, 07:36

  24. Oli Bartsch voted on patch set 4 V +2 CR +2 05/02/22, 07:55

  25. Oli Bartsch merged patch set 5 05/02/22, 07:55