Review main Merged

83745[BUGFIX] Ensure correct default value normalization

Stefan Bürk CR +2 V +2 Hard +281 −2 updated 04/16/24, 16:26

Commit message

Default value support for TEXT, JSON and BLOB fields
has been added with #103578 by implementing the use
of default value expression for MySQL. That required
to add custom normalization on data schema reads to
be comparable.

MySQL requires to use a single-quote to quote a single
quote in a value string, and due to the expression way
this needs to be properly decoded now in two steps:

* Revert escape sequences in the retrieved default value
* Unquote the unescaped retrieved default value

JSON field defaults shows a similar issue for double
quotes in the json value and can be fixed in the same
way.

Added test revealed, that Doctrine DBAL has an issue
with double single-quotes for PostgreSQL too. To fix
this the issue has been reported [1] and a pull-request
provided [2].

This change ensure correct unescaping and unquoting of
the retrieved column default value for TEXT, JSON and
BLOB column types for MySQL connections, enriched with
further tests.

The extended PostreSQLSchemaManager now clones method
`_getPortableTableColumnDefinition()` to incorporate
the bugfix directly until a fixed Doctrine DBAL version
has been released.

[1] https://github.com/doctrine/dbal/issues/6357
[2] https://github.com/doctrine/dbal/pull/6358

Review

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

Issues 2

Files 10

Review log 1220

  1. Stefan Bürk uploaded patch set 1 04/11/24, 11:31

  2. core-ci voted on patch set 1 V +1 04/11/24, 11:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55765

  3. Stefan Bürk rebased onto patch set 2 V +1 04/11/24, 11:44

  4. core-ci voted on patch set 2 V +1 04/11/24, 11:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55769

  5. Stefan Bürk uploaded patch set 3 V +1 04/11/24, 13:27

  6. core-ci voted on patch set 3 V -1 04/11/24, 13:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55772

  7. Stefan Bürk uploaded patch set 4 V -1 04/11/24, 13:42

  8. core-ci voted on patch set 4 V -1 04/11/24, 13:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55773

  9. Stefan Bürk rebased onto patch set 5 V -1 04/11/24, 18:33

  10. core-ci voted on patch set 5 V -1 04/11/24, 18:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55786

  11. Stefan Bürk uploaded patch set 6 V -1 04/16/24, 10:15

  12. core-ci voted on patch set 6 V -1 04/16/24, 10:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56070

  13. Stefan Bürk uploaded patch set 7 V -1 04/16/24, 13:00

  14. Stefan Bürk uploaded patch set 8 04/16/24, 13:01

  15. core-ci voted on patch set 7 V +1 04/16/24, 13:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56082

  16. core-ci voted on patch set 8 V +1 04/16/24, 13:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56083

  17. Christian Kuhn voted on patch set 8 CR +1 V +1 04/16/24, 15:38

  18. Garvin Hicking commented on patch set 8 CR +1 V +1 04/16/24, 15:57

    What an odyssee. Fingers crossed this will be addressed upstream. Thanks!
  19. Stefan Bürk voted on patch set 8 CR +2 V +2 04/16/24, 16:26

  20. Stefan Bürk merged patch set 9 04/16/24, 16:26