Review main Merged

77324[TASK] Show explain selection in DB check only for Mysql

Georg Ringer CR +2 V +2 Easy +9 −0 updated 01/16/23, 16:40

Commit message

As the selection "explain" only works for Mysql, it should also only be
displayed then.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1518

  1. Georg Ringer uploaded patch set 1 01/11/23, 07:24

  2. Georg Ringer commented on patch set 1 01/11/23, 07:24

    This change is ready for review.
  3. core-ci voted on patch set 1 V +1 01/11/23, 07:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35669

  4. Andreas Kienast commented on patch set 1 01/11/23, 08:17

    DatabaseIntegrityController.php:157

    IMO `$connection->getDatabasePlatform() instanceof AbstractMySQLPlatform` is more stable here.
  5. Andreas Kienast commented on patch set 1 01/11/23, 08:23

    DatabaseIntegrityController.php:157 Reply

    Of course with the according negation...
  6. Georg Ringer uploaded patch set 2 V +1 01/11/23, 11:11

  7. core-ci voted on patch set 2 V +1 01/11/23, 11:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35677

  8. Christian Kuhn commented on patch set 2 01/11/23, 11:44

    maybe v11 as well?
  9. Georg Ringer updated the commit message in patch set 3 V +1 01/11/23, 11:51

  10. core-ci voted on patch set 3 V +1 01/11/23, 11:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35679

  11. Stefan Bürk commented on patch set 3 CR -1 01/11/23, 13:18

    Basicly, all supported dbms types and versions supports query explains, not only "MySQL". At least so far I know and could look up in quick search. So,we should recheck this here more precisly. Beside this, if we need a check - the check should be based upon the platform class, as already mentioned by Andreas in the commend of the check. `AbstractMySQLPlatform` would match MySQL and MariaDB connections in all versions, what `MySQLPlatform` would do also. doctrine/dbal 2.x (TYPO3 v11) does not have `AbstractMySQLPlatform`, thus this *must* be changed on the backport or we use `MySQLPlatform` directly if we want to really narrow this down to only a specific set of dbms. What have to be checked, if the "result" does differ between the differnt dbms. For example MSSQL would return a "xml" if I remember it right. (v11 as dropped in v12). So far as a quick look comment. Well do a detailed look later and come back, thus -1 for now. And I think there is reason why dbal do not have a abstraction for that.
  12. Christian Kuhn commented on patch set 3 01/12/23, 09:10

    Stefan, I think adding support in our db-api for explain is overkill: currently, the query just crashes with sqlite/postgres and we don't have any api to express 'explain' in our API. As such, the patch is reasonable: have it for maria/mysql, skip it for others. If someone really needs 'explain' in this edge feature, it could be requested later for other dbms and we may *then* want to look at possible api along the way. what do you think?
  13. Christian Kuhn commented on patch set 3 01/12/23, 09:13

    Reply

    If we agree on that, the only question is if we keep the test for 'AbstractMySQLPlatform', or go with something different, or keep in main and change in backport. what's your opinion on that?
  14. Stefan Bürk commented on patch set 3 CR +1 01/12/23, 09:24

    Reply

    Had a look yesterday, just forgot to update the comment here. You are right, extending the API for that is an overkill. If really needed, we can enhance this eventually in this module for other dbms if requested, but leaving it out for now. Patch is fine imo, just in the backport we should change to `MySQLPlatform` for the instanceof check.

    Reply

    Done

    Reply

    Done

    DatabaseIntegrityController.php:157 Reply

    Done
  15. Stefan Bürk voted on patch set 3 V +1 01/12/23, 09:32

  16. Christian Kuhn commented on patch set 3 V +1 CR +1 01/12/23, 11:40

    Reply

    Ack
  17. Christian Kuhn voted on patch set 3 V +2 CR +2 01/16/23, 16:40

  18. Christian Kuhn merged patch set 4 01/16/23, 16:40