Bug #97498
closedMariaDB + enum field generates endless DB comparison loop due to wrong/twice string escaping of default value
100%
Description
We have an enum field like this:
enum_field enum ('A', 'B', 'C') default 'A' not null
We switched from MySQL to MariaDB. On MySQL this made no problems in the DB comparison in the Install Tool, but on MariaDB the DB comparison always trys to alter it, because it detects the field as this (note the triple-quoting on the default value):
enum_field enum ('A', 'B', 'C') default '''A''' not null
Additional info: this does also happen if declaring the field as nullable and using default null
- TYPO3 then detects default 'null'
(the string "null", not the literal null value)!
It happens with both drivers, mysqliq
and pdo_mysql
. On MySQL it works with both drivers, on MariaDB this change is alwas suggested with both drivers.
I'm not sure whether this is a Doctrine DBAL or a TYPO3 bug.
Discovered on v10, probably valid in others, too (v11 uses teh same DBAL version, so I assume it's still in there).
Updated by S P over 2 years ago
- Subject changed from MariaDB + enum field genrates endless DB comparison loop due to wrong/twice string escaping of default value to MariaDB + enum field generates endless DB comparison loop due to wrong/twice string escaping of default value
Updated by Markus Klein 4 months ago
- Related to Bug #89848: Database Analyzer crashes with undefined enum fields added
Updated by Gerrit Code Review 4 months ago
- Status changed from New to Under Review
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85511
Updated by Stefan Bürk 4 months ago
- Related to Bug #104413: Issue with custom database variable type (ENUM & SET DataTypes) added
Updated by Gerrit Code Review 4 months ago
Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85511
Updated by Gerrit Code Review 4 months ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85460
Updated by Gerrit Code Review 4 months ago
Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85460
Updated by Stefan Bürk 4 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5b2ad55ff78021aef42719c38fb7abb2894fe906.
Updated by Garvin Hicking 3 months ago
- Related to Bug #104621: SchemaColumnDefinitionListener throws a type error while "analyze database" in Maintenance module added