Bug #21730

ALTER TABLE is not able to parse length restriction in index creation (Oracle)

Added by Xavier Perseguers over 5 years ago. Updated over 5 years ago.

Status:Closed Start date:2009-11-29
Priority:Should have Due date:
Assigned To:Xavier Perseguers % Done:

0%

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

Description

When installing RealURL, table tx_realurl_uniqalias contains a length restriction on field value_alias for index/key bk_realurl02. The length restriction is properly parsed during the table creation process (thanks to change #16689).

Now, due to #16689, the index cannot be actually created because its generated identifier name, in Oracle, is too long, DBAL wants to create it with name tx_realurl_uniqalias_bk_realurl02 which is 33 character wide and greater than the Oracle limit which is 30 characters and not even 32 as reported sometimes. As such, Install Tool asks us to ALTER TABLE tx_realurl_uniqalias to create the missing index:

ALTER TABLE tx_realurl_uniqalias ADD KEY bk_realurl02 (tablename,field_alias,field_id,value_alias(220),expire);

However length limit, although properly parsed in CREATE TABLE statements, is not handled when found in ALTER TABLE statements and trying to perform the change leads to a parser error:

ERROR: Query could not be parsed: "SQL engine parse ERROR: No ) parenthesis in list: near "(220),expire) "". Query: "ALTER TABLE tx_realurl_uniqalias ADD KEY bk_realurl02 (tablename,field_alias,field_id,value_alias(220),expire);"

(issue imported from #M12829)

12829_core.diff Magnifier (561 Bytes) Administrator Admin, 2010-02-14 18:29

12829_dbal.diff Magnifier (1.1 kB) Administrator Admin, 2010-02-14 18:29


Related issues

related to Core - Bug #16292: installer doesn't cope with maximum table and field lengt... New 2006-06-27
related to Core - Bug #21719: Install Tool can not create cachingframework databases Closed 2009-11-27
related to Core - Bug #16689: Index on tx_realurl_uniqalias breaks with DBAL Closed 2006-11-06

History

#1 Updated by Xavier Perseguers over 5 years ago

Committed to Core:

- trunk (rev. 6902)
- 4-3 (rev. 6903)

Committed to DBAL:

- trunk (rev. 30009)
- 1-0 (rev. 30010)

Also available in: Atom PDF