Bug #16292

installer doesn't cope with maximum table and field length (Oracle XE, MS SQL via DBlib)

Added by Martin Kutschker about 9 years ago. Updated about 1 month ago.

Status:New Start date:2006-06-27
Priority:Should have Due date:
Assigned To:Andreas Fernandez % Done:

0%

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

Description

In Oracle the max. length of names is 30 characters.

So eg this index fails (ORA-00972):

CREATE INDEX "pages_language_overlay_t3ver_oid" ON "pages_language_overlay" ("t3ver_oid", "t3ver_wsid")

If you access MSSQL via DBlib (ntwdblib.dll <=> php_mssql.dll) there also exists this limitation.

(issue imported from #M3751)

3751.diff Magnifier (4.2 kB) Administrator Admin, 2009-11-23 20:17


Related issues

related to Core - Bug #23575: Allow DBAL to interact with EM to configure remapping Resolved 2010-09-21
related to Core - Task #64568: Implement automatic table mapping Under Review 2015-01-28
related to Core - Bug #21730: ALTER TABLE is not able to parse length restriction in in... Closed 2009-11-29
related to Core - Bug #16293: installer lists indices under "add fields" Closed 2006-06-27

History

#1 Updated by Karsten Dambekalns about 9 years ago

For tables/fields this can be worked around by setting up a name mapping. For indexes this isn't possible currently.

#2 Updated by Martin Kutschker about 9 years ago

For automatically created names like index names (or sequences and constarints?) DBAL could use the base name of the table concatenated with the md5 hash of the index name (truncated to the max name length).

#3 Updated by Martin Kutschker about 9 years ago

Mapping should not be necessary for generated names.

DBAL should provide means to do some kind of auto-mapping. Doesn't ADOdb know about length restrictions?

#4 Updated by Karsten Dambekalns almost 9 years ago

I looked around, but ADOdb has no support for handling field name length issues (semi-)automatically.

#5 Updated by Xavier Perseguers over 5 years ago

First "attempt" with attached patch.

#6 Updated by Alexander Opitz over 1 year ago

  • Status changed from Accepted to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.2
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?

#7 Updated by Xavier Perseguers over 1 year ago

Long time since I tried Oracle or MSSQL so I cannot stay, but I would expect the problem to still be there since:

  1. It cannot obviously fix itself and virtually nobody is actively testing on anything else than MySQL
  2. Install Tool has been completely rewritten in 6.2 and the "hook" I introduced is likely NOT to work anymore
  3. Extbase is used more and more but is really not good at working with other DBMS

#8 Updated by Alexander Opitz over 1 year ago

  • Status changed from Needs Feedback to New

Hmmm but on the other side, I'd open many issues to the time around 4.3 to get dbal working with ORACLE, maybe it was fixed with another issue.

#9 Updated by Mathias Schreiber 6 months ago

  • Status changed from New to Needs Feedback
  • Assigned To changed from Xavier Perseguers to Andreas Fernandez

@Andy: thoughts?

#10 Updated by Andreas Fernandez 6 months ago

This is still an issue, as you have to set the mappings in LocalConfiguration before starting the installation. With the patch that handles large IN lists I created a base to tackle further DBMS specific issues. But this is a very tough one, as you can catch the processed table and its length, but how do we proceed then?

  • Throw an exception that says "Table length is not compliant to your used DBMS" (e.g. 30 in Oracle)? This won't got into 6.2.
  • Generate a random table name as defined by more random rules (e.g. replace "extbase" with "xtb", "pages" with "pg" and so on).

Also, this issue occurs with indeces, sometimes they exceed the limit, too.

#11 Updated by Alexander Opitz about 1 month ago

  • Status changed from Needs Feedback to New

Also available in: Atom PDF