Review main Ready for review

97207[BUGFIX] SQL parser handles float UNSIGNED now

Markus Klein CR +1 V +1 Easy +25 −9 updated 11/13/26, 08:19

Commit message

The parser correctly identified this option, but `DecimalDataType` and `FloatDataType` did
not store it.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/07/97207/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/07/97207/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR +1 Needs a vote
    • Georg Ringer +1
  • Verified V +1 Needs a vote
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 911

  1. Markus Klein uploaded patch set 1 10/28/26, 20:17

  2. core-ci voted on patch set 1 V +1 10/28/26, 20:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112751

  3. Oli Bartsch commented on patch set 1 10/28/26, 20:53

    DecimalDataType.php:32

    Could we have a test for this? Suggest to add `DECIMAL(5,2) UNSIGNED` and `NUMERIC(5,2) UNSIGNED` cases to `FixedPointTypesTest` that assert `isUnsigned()`. Currently only precision and scale are checked, so a later refactoring of the constructors could bring the bug back.

    DecimalDataType.php:32

    `FloatDataType` (the parent of `DoubleDataType` and `RealDataType`) also receives the numeric options and never calls `setUnsigned()`, so `FLOAT UNSIGNED` stays signed as well. Suggest to apply the same fix there.
  4. Markus Klein commented on patch set 1 10/28/26, 22:20

    DecimalDataType.php:32 Reply

    Indeed. Yes, this should be added there as well then. Will do tomorrow

    DecimalDataType.php:32 Reply

    Actually, I simply pushed the patch and waited for failing tests. ;-) Clearly we need coverage for that.
  5. Markus Klein uploaded patch set 2 V +1 10/30/26, 07:43

  6. core-ci voted on patch set 2 V +1 10/30/26, 07:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112835

  7. Markus Klein commented on patch set 2 10/31/26, 20:43

    DecimalDataType.php:32 Reply

    Done

    DecimalDataType.php:32 Reply

    Done
  8. Georg Ringer voted on patch set 2 CR +1 V +1 11/10/26, 08:07

  9. Benni Mack commented on patch set 2 11/13/26, 07:30

    Two things: 1. FloatingPointTypesTest should get FLOAT/DOUBLE/REAL UNSIGNED cases, the float part is untested. 2. On existing MySQL/MariaDB installations the DB analyzer now suggests ALTER … UNSIGNED for such columns, and that fails with "Out of range value" if negative values exist.
  10. Markus Klein commented on patch set 2 11/13/26, 07:51

    Reply

    1.) will check that 2.) That's unexpected. If the column was declared unsigned manually, that was done on purpose, so whatever is stored in there is most likely not negative. If you really have that case, then you're setup was already wrong before and worked only, because our parse failed to parse this. I'd say that's okay.
  11. Benni Mack commented on patch set 2 11/13/26, 08:19

    Reply Unresolved

    2. I don't have this scenario IRL, I have fumbled around with this locally, so I'm totally fine with this change.