Issue Bug Closed

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

Xavier Perseguers 11/29/09, 10:32 updated 02/22/10, 23:06

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)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.