Project

General

Profile

Actions

Bug #97498

closed

MariaDB + enum field generates endless DB comparison loop due to wrong/twice string escaping of default value

Added by S P over 2 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2022-04-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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).


Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #89848: Database Analyzer crashes with undefined enum fieldsUnder ReviewStefan Bürk2019-12-04

Actions
Related to TYPO3 Core - Bug #104413: Issue with custom database variable type (ENUM & SET DataTypes)ClosedStefan Bürk2024-07-17

Actions
Related to TYPO3 Core - Bug #104621: SchemaColumnDefinitionListener throws a type error while "analyze database" in Maintenance moduleClosed2024-08-14

Actions
Actions #1

Updated by S P over 2 years ago

  • Description updated (diff)
Actions #2

Updated by S P over 2 years ago

  • Description updated (diff)
Actions #3

Updated by S P over 2 years ago

  • Description updated (diff)
Actions #4

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
Actions #5

Updated by Markus Klein 4 months ago

  • Related to Bug #89848: Database Analyzer crashes with undefined enum fields added
Actions #6

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

Actions #7

Updated by Stefan Bürk 4 months ago

  • Related to Bug #104413: Issue with custom database variable type (ENUM & SET DataTypes) added
Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

Updated by Stefan Bürk 4 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Garvin Hicking 3 months ago

  • Related to Bug #104621: SchemaColumnDefinitionListener throws a type error while "analyze database" in Maintenance module added
Actions #13

Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF