Bug #16292
closed
installer doesn't cope with maximum table and field length (Oracle XE, MS SQL via DBlib)
Added by Martin Kutschker over 18 years ago.
Updated about 6 years ago.
Category:
Database API (Doctrine DBAL)
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)
Files
For tables/fields this can be worked around by setting up a name mapping. For indexes this isn't possible currently.
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).
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?
I looked around, but ADOdb has no support for handling field name length issues (semi-)automatically.
First "attempt" with attached patch.
- 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)?
Long time since I tried Oracle or MSSQL so I cannot stay, but I would expect the problem to still be there since:
- It cannot obviously fix itself and virtually nobody is actively testing on anything else than MySQL
- Install Tool has been completely rewritten in 6.2 and the "hook" I introduced is likely NOT to work anymore
- Extbase is used more and more but is really not good at working with other DBMS
- 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.
- Status changed from New to Needs Feedback
- Assignee changed from Xavier Perseguers to Andreas Kienast
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.
- Status changed from Needs Feedback to New
- Status changed from New to Needs Feedback
- Status changed from Needs Feedback to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF