Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034258Openbravo ERPY. DBSourceManagerpublic2016-10-20 18:592022-02-01 08:09
caristu 
Triage Platform Base 
highminoralways
newopen 
5
 
 
Core
No
0034258: Not possible to apply two indexes on the same column but with different operator class in Oracle
Is not possible to apply two indexes on the same column but with different operator class in Oracle. This model definition is valid in PostgreSQL but currently not possible to apply in Oracle.

Oracle does not allow to have more that one index defined for a particular set of columns, and as the operator class definition is not taken into account in Oracle, eventually two indexes for the same column, one with operator class and the other one without it, are considered the same in Oracle.
1) In an Oracle based environment, apply the attached patch which contains two index definitions. They both apply to the same column, but one of them make use of an operator class.

2) Run ant update.database -Dforce=yes. The following error is thrown by the task and it does not end correctly:

[java] 263567 WARN - SQL Command failed with: ORA-01408: such column list already indexed
     [java]
     [java] 263583 WARN - -- END
     [java] CREATE INDEX A_AMORTIZATION_UPPER_OPC ON A_AMORTIZATION (NAME)
     [java] 281824 INFO - Executed 604 SQL command(s) with 1 error(s)


3) Repeat steps 1) and 2) in a PostgreSQL based environment. Both indexes are created properly.

No tags attached.
related to feature request 0030525 closed AugustoMauch Provide support in DBSourceManager to define an operator class in index columns 
related to feature request 0032211 closed caristu support for partial indexes 
diff indexesIssue34258.diff (739) 2016-10-20 19:02
https://issues.openbravo.com/file_download.php?file_id=9935&type=bug
Issue History
2016-10-20 18:59caristuNew Issue
2016-10-20 18:59caristuAssigned To => platform
2016-10-20 18:59caristuModules => Core
2016-10-20 18:59caristuTriggers an Emergency Pack => No
2016-10-20 19:00caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13433#r13433
2016-10-20 19:00caristuIssue Monitored: networkb
2016-10-20 19:00caristuIssue End Monitor: networkb
2016-10-20 19:00caristuRelationship addedrelated to 0030525
2016-10-20 19:01caristuRelationship addedrelated to 0032211
2016-10-20 19:02caristuFile Added: indexesIssue34258.diff
2016-10-20 19:09caristuDescription Updatedbug_revision_view_page.php?rev_id=13435#r13435
2016-12-01 13:09alostaleTypedefect => design defect
2022-02-01 08:09alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.