Project

General

Profile

Actions

Bug #105310

closed

\TYPO3\CMS\Core\Database\Schema\Parser\Parser translates CHAR to VARCHAR

Added by Alexander Schnitzler 3 months ago. Updated 15 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2024-10-15
Due date:
% Done:

100%

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

Description

Given the following ext_tables.sql

CREATE TABLE table (
  column CHAR(2),
);

the schema parser detects a char-type but it translates it into a doctrine/dbal type string without fixed set to true. So, this will be translated to

CREATE TABLE table (
  column VARCHAR(2),
);

This would be fixed if the constructor of \TYPO3\CMS\Core\Database\Schema\Parser\AST\DataType\CharDataType sets its fixed property to true.
Alternatively, fixed could be part of the options passed into the constructor.


Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #103141: TCA type=uuid does not use native uuid type for postgresqlUnder Review2024-02-17

Actions
Related to TYPO3 Core - Task #105867: Use VARCHAR instead of CHAR in core ext_tables.sqlResolvedStefan Bürk2024-12-28

Actions
Actions #1

Updated by Alexander Schnitzler 3 months ago

  • Related to Bug #103141: TCA type=uuid does not use native uuid type for postgresql added
Actions #2

Updated by Stefan Bürk 30 days ago

The problem with fixed CHAR is, that PostgreSQL behaves here
differently than MariaDB, MySQL and SQLite.

Postgres fills up the retrieved value with spaces to PAD the
value to the fixed length, the others will not do this.

Cross database queries like it have to be provided by TYPO3
itself MUST handle this difference(s) correctly and should
be avoid as much as possible using VARCHAR instead and have
the same behaviour accross all supported TYPO3 database vendors.

Actions #3

Updated by Gerrit Code Review 30 days ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #4

Updated by Gerrit Code Review 30 days ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #5

Updated by Stefan Bürk 25 days ago

  • Related to Task #105867: Use VARCHAR instead of CHAR in core ext_tables.sql added
Actions #6

Updated by Gerrit Code Review 25 days ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #7

Updated by Gerrit Code Review 20 days ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #8

Updated by Gerrit Code Review 19 days ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #9

Updated by Gerrit Code Review 16 days ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #10

Updated by Gerrit Code Review 16 days ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #11

Updated by Gerrit Code Review 16 days ago

Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #12

Updated by Gerrit Code Review 16 days ago

Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #13

Updated by Gerrit Code Review 16 days ago

Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #14

Updated by Gerrit Code Review 15 days ago

Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #15

Updated by Gerrit Code Review 15 days ago

Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #16

Updated by Gerrit Code Review 15 days ago

Patch set 13 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #17

Updated by Gerrit Code Review 15 days ago

Patch set 14 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87584

Actions #18

Updated by Gerrit Code Review 15 days ago

Patch set 1 for branch 13.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/+/87656

Actions #19

Updated by Stefan Bürk 15 days ago

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

Also available in: Atom PDF