Bug #21730
closedALTER TABLE is not able to parse length restriction in index creation (Oracle)
0%
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)
Files