Bug #67288

Field types don't get properly translated to MySQL types

Added by Morton Jonuschat 2 months ago. Updated about 1 month ago.

Status:Resolved Start date:2015-06-03
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:DBAL Spent time: -
Target version:-
TYPO3 Version:7 Is Regression:No
PHP Version:5.6 Sprint Focus:
Complexity:

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 Core - Epic #64459: Make TYPO3 run on PostgreSQL New 2015-01-23
related to Core - Task #67297: Move MySQL / DBMS field type translation into DBAL Specifics Resolved 2015-06-04

Associated revisions

Revision b1059192
Added by Morton Jonuschat about 1 month 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
Added by Morton Jonuschat about 1 month 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 2 months 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 2 months 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 about 1 month 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 about 1 month 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 about 1 month 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 about 1 month 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 about 1 month 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 1 month ago

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

Also available in: Atom PDF