Project

General

Profile

Actions

Bug #67290

closed

Translation of MySQL field types to other databases is incorrect

Added by Morton Jonuschat over 9 years ago. Updated about 6 years ago.

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

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

MySQL supports an extension for optionally specifying the display width of integer data types in parentheses following the base keyword for the type. For example, INT specifies an INT with a display width of four digits. This optional display width may be used by applications to display integer values having a width less than the width specified for the column by left-padding them with spaces. (That is, this width is present in the metadata returned with result sets. Whether it is used or not is up to the application.)

The display width does not constrain the range of values that can be stored in the column. Nor does it prevent values wider than the column display width from being displayed correctly. For example, a column specified as SMALLINT has the usual SMALLINT range of -32768 to 32767, and values outside the range permitted by three digits are displayed in full using more than three digits.

Thus the correct translation for INT would be INT / INTEGER / INT4.

More discrepancies show up with other field types, resulting in the install tool database compare showing changes that are never going to get resolved.

TINYTEXT will be created as VARCHAR and reported as VARCHAR
TEXT and MEDIUMTEXT will be created/reported as LONGTEXT
...

TYPO3: 7.3-dev
DBMS: PostgreSQL 9.4


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Epic #64459: Make TYPO3 run on PostgreSQLClosed2015-05-21

Actions
Related to TYPO3 Core - Task #67297: Move MySQL / DBMS field type translation into DBAL SpecificsClosed2015-06-04

Actions
Related to TYPO3 Core - Task #67626: Document "DBMS specific conversion between Meta/MySQL field types"ClosedMorton Jonuschat2015-06-19

Actions
Actions #1

Updated by Gerrit Code Review over 9 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40138

Actions #2

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40138

Actions #3

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40138

Actions #4

Updated by Gerrit Code Review over 9 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40138

Actions #5

Updated by Gerrit Code Review over 9 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40138

Actions #6

Updated by Morton Jonuschat over 9 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF