Bug #67288

Field types don't get properly translated to MySQL types

Added by Morton Jonuschat over 4 years ago. Updated 12 months ago.

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

100%

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

Description

DBAL doesn't seem to properly convert the field types returned in admin_get_fields() to MySQL types.

When doing a database compare with DBAL enabled I get results like this:

ALTER TABLE be_sessions CHANGE ses_backuserid ses_backuserid int(11) NOT NULL default '0'; 
Current value: (8) default '0'
<pre>

Real field type is int8  / BIGINT which is often denoted as INT(8). The type information (INT) is being lost completly. The same is true for every other field type encountered

TYPO3 7.3-dev
PostgreSQL 9.4

Related issues

Related to TYPO3 Core - Epic #64459: Make TYPO3 run on PostgreSQL Closed 2015-05-21
Related to TYPO3 Core - Task #67297: Move MySQL / DBMS field type translation into DBAL Specifics Closed 2015-06-04

Associated revisions

Revision b1059192 (diff)
Added by Morton Jonuschat over 4 years ago

[TASK] dbal: Move MySQL / DBMS field type translation into DBMS Specifics

The function used by the DBAL provide a very coarse and generic translations
between the ADdb meta types and the MySQL native types. This results in
ambiguities that can't properly be resolved and leads to changes in the
install tool schema migration that can never be resolved.

The default DBMS specifics provided resemble the current output of the
functions and don't result in any changes to the DBMS schema.

Resolves: #67297
Related: #67290
Related: #67288
Releases: master
Change-Id: Id26a897c7f43520edd188e0bd2ddb158507c8049
Reviewed-on: http://review.typo3.org/39954
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

Revision 8d09ff5c (diff)
Added by Morton Jonuschat about 4 years ago

[BUGFIX] dbal: return field type information from admin_get_fields()

Deprecate MetaType() which always returned an empty meta fieldtype
with DBAL and move function to getMetadata(). The signature for
getMetadata() includes the field information for the query so that
the cached field metatype can be used before resorting to querying
the DBMS.

Resolves: #67288
Releases: master
Change-Id: I57dbd7501c9e7a62f2164fb755f1d1a73da01a05
Reviewed-on: http://review.typo3.org/39941
Reviewed-by: Xavier Perseguers <>
Reviewed-by: Stephan GroƟberndt <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

History

#1 Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

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/39941

#2 Updated by Gerrit Code Review over 4 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/39941

#3 Updated by Gerrit Code Review over 4 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/39941

#4 Updated by Gerrit Code Review over 4 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/39941

#5 Updated by Gerrit Code Review over 4 years ago

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

#6 Updated by Gerrit Code Review over 4 years ago

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

#7 Updated by Gerrit Code Review over 4 years ago

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

#8 Updated by Morton Jonuschat about 4 years ago

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

#9 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF