Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0041795
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2019-09-10 18:122019-09-19 09:02
ReportervmromanosView Statuspublic 
Assigned Toplatform 
PrioritynormalResolutioninvalidFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0041795: Oracle only: multi-column index with function based column doesn't properly apply

DescriptionIt seems that when you have a multi-column index where any of the columns has a function, the install.source/update.database processes fail in Oracle (in PG works fine).
Steps To ReproduceIn an Oracle instance clone the following modules:
https://code.openbravo.com/erp/pmods/org.openbravo.oms [^]
https://code.openbravo.com/erp/mods/org.openbravo.api.ticket [^]

Note the OBOMS_STOCK_BY_WAREHOUSE table has the following index:
  <index name="OBOMS_SBW_AVAILABLEPROD_IX" unique="false">
        <index-column name="functionBasedColumn" functionExpression="(QTYONHAND-RESERVEDQTY)>0"/>
        <index-column name="M_PRODUCT_ID"/>
  </index>

Run ant install.source (with smartbuild -Dlocal=no it is also reproducible).
The following error is thrown:

[createdatabase] 168019 [main] WARN org.apache.ddlutils.platform.OracleStandardBatchEvaluator - SQL Command failed with: ORA-00907: falta el paréntesis derecho
[createdatabase]
[createdatabase] 168019 [main] WARN org.apache.ddlutils.platform.OracleStandardBatchEvaluator - -- END
[createdatabase] CREATE INDEX OBOMS_SBW_AVAILABLEPROD_IX ON OBOMS_STOCK_BY_WAREHOUSE (((QTYONHAND-RESERVEDQTY)>0), M_PRODUCT_ID)
[createdatabase] 210228 [main] INFO org.apache.ddlutils.platform.OracleStandardBatchEvaluator - Executed 14045 SQL command(s) with 1 error(s) in 141956 ms
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0041785 closedalostale Error with function index including a coalesce with a varchar 

-  Notes
(0114664)
alostale (manager)
2019-09-19 09:02

This is a limitation on how Oracle supports functions on indexes, therefore there is no solution that can be implemented in dbsm.

> CREATE TABLE TEST
   ( TEST_ID VARCHAR2(32) NOT NULL ENABLE,
AMT1 NUMBER,
AMT2 NUMBER,
CONSTRAINT "TEST_ID" PRIMARY KEY ("TEST_ID"));
Table TEST created.
     
> CREATE INDEX TEST_I1 ON TEST (AMT1-AMT2);
Index TEST_I1 created.
     
> CREATE INDEX TEST_I2 ON TEST (AMT1-AMT2>0);
Error report -
ORA-00907: missing right parenthesis
00907. 00000 - "missing right parenthesis"

> CREATE INDEX TEST_I2 ON TEST (AMT1>0);
Error report -
ORA-00907: missing right parenthesis
00907. 00000 - "missing right parenthesis"

- Issue History
Date Modified Username Field Change
2019-09-10 18:12 vmromanos New Issue
2019-09-10 18:12 vmromanos Assigned To => platform
2019-09-10 18:12 vmromanos Modules => Core
2019-09-10 18:12 vmromanos Triggers an Emergency Pack => No
2019-09-10 18:12 vmromanos Relationship added related to 0041785
2019-09-10 18:15 vmromanos Steps to Reproduce Updated View Revisions
2019-09-10 18:16 vmromanos Steps to Reproduce Updated View Revisions
2019-09-19 09:02 alostale Note Added: 0114664
2019-09-19 09:02 alostale Status new => closed
2019-09-19 09:02 alostale Resolution open => invalid


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker