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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033659
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2016-08-09 08:292016-12-16 18:38
ReportervmromanosView Statuspublic 
Assigned Toinigosanchez 
PrioritynormalResolutionopenFixed in Version3.0PR17Q1
StatusclosedFix in branchFixed in SCM revision306b87decaa6
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033659: DB consistency error with function index (Oracle only)

DescriptionA new function is defined in the prescript-Oracle.sql.
This function is linked to a function index in any table.

The install source and update database processes are working fine, however the export database modifies the function index definition in Oracle only:

- <index-column name="functionBasedColumn" functionExpression="OBEQUALS(GENERATED_CREDIT, USED_CREDIT)"/>
+ <index-column name="functionBasedColumn" functionExpression="TRY_FULL_ORACLE.OBEQUALS(GENERATED_CREDIT,USED_CREDIT)"/>
Steps To Reproduce1. Apply the attached patch in issue 0033581. It defines a function called OBEQUALS inside the prescripts* files, which is linked to a new index in FIN_PAYMENT table.
2. Run ant smartbuild -Dlocal=no (or install source). Verify it works fine
3. Set Core in development
4. Run ant export.database. Verify the index definition has changed, including now the bbdd.user defined in Openbravo.properties.
This creates a db consistency problem

Please note that this code is working fine for Postgresql (9.3)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0034209 closedplatform DB consistency error with function index with 2 or more parameters separated by blank space or not 
blocks defect 00335813.0PR17Q2 closedvmromanos slow defaults retrieval in add payment 

-  Notes
(0090759)
hgbot (developer)
2016-10-21 12:38

Repository: erp/devel/dbsm-main
Changeset: af0309f5d016a3409494216292848bc0de405f24
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Oct 21 12:37:37 2016 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/af0309f5d016a3409494216292848bc0de405f24 [^]

Related issue 33659: DB consistency error with function index (Oracle only)

When exporting database with a new custom function a db consistency error is
thrown in Oracle. The problem is that oracle add db user name at the beginning
of the indexExpression. For example, if "OBEQUALS(COL1)" is defined, export
database found this change "DB_USER.OBEQUALS(COL1)" and a db consistency error
is thrown. This problem was reproducible only in Oracle.

This problem has been solved removing db user name in the indexExpression in
OracleModelLoader.

Besides It has been created a test case for testing this
scenario in oracle and postgres too.

---
M src-test/src/org/openbravo/dbsm/test/model/ModelSuite.java
M src/org/apache/ddlutils/platform/oracle/OracleModelLoader.java
A src-test/model/excludeFilter/excludeIndexFunction.xml
A src-test/model/indexes/BASE_FUNCTION_INDEX_PRESCRIPT.xml
A src-test/src/org/openbravo/dbsm/test/model/CheckIndexFunctionInPrescripts.java
---
(0090760)
hgbot (developer)
2016-10-21 12:42

Repository: erp/devel/pi
Changeset: 306b87decaa619f8cbf637a7af1290afe68eb521
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Oct 21 12:40:46 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/306b87decaa619f8cbf637a7af1290afe68eb521 [^]

Fixed issue 33659: DB consistency error with function index (Oracle only)

---
M src-db/database/lib/dbsourcemanager.jar
---
(0090806)
caristu (developer)
2016-10-24 10:35

Check code review at: https://docs.google.com/spreadsheets/d/18l2biKWeG6iGDIPqO6VuYQ_TtP_6YxyQU4KSrPvQlJ8/edit#gid=0 [^]
(0090857)
hgbot (developer)
2016-10-25 11:35

Repository: erp/devel/dbsm-main
Changeset: 854d69af1cbf9a5efa54b4db9cede2067837dc22
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Oct 25 11:28:59 2016 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/854d69af1cbf9a5efa54b4db9cede2067837dc22 [^]

Related issue 33659: Codereview improvements.

---
M src-test/src/org/openbravo/dbsm/test/model/CheckIndexFunctionInPrescripts.java
M src/org/apache/ddlutils/platform/oracle/OracleModelLoader.java
---
(0090858)
hgbot (developer)
2016-10-25 11:36

Repository: erp/devel/pi
Changeset: c824d425f341595173fc89868ca605661827df4d
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Oct 25 11:34:43 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c824d425f341595173fc89868ca605661827df4d [^]

Related issue 33659: Codereview improvements

---
M src-db/database/lib/dbsourcemanager.jar
---
(0090860)
hgbot (developer)
2016-10-25 12:47

Repository: erp/devel/dbsm-main
Changeset: d3aa94edffe76ada3d0e21527f2cec6f0d507873
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Oct 25 12:47:18 2016 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/d3aa94edffe76ada3d0e21527f2cec6f0d507873 [^]

Related issue 33659: Removed unnecesary comment.

---
M src/org/apache/ddlutils/platform/oracle/OracleModelLoader.java
---
(0090861)
caristu (developer)
2016-10-25 12:55

Code reviewed and tested with steps to reproduce: after exporting, the db owner is not included into the index functionExpression.
(0090866)
hgbot (developer)
2016-10-25 15:16

Repository: erp/devel/dbsm-main
Changeset: 6d64bb165ec3470d0ed0716a4e2f9c872ff65fa0
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Oct 25 15:14:13 2016 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/6d64bb165ec3470d0ed0716a4e2f9c872ff65fa0 [^]

Related with issue 33659: fix test case in Postgres

---
M src-test/src/org/openbravo/dbsm/test/model/CheckIndexFunctionInPrescripts.java
---
(0092541)
hudsonbot (developer)
2016-12-16 18:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dc8bf00badd0 [^]
Maturity status: Test
(0092554)
hudsonbot (developer)
2016-12-16 18:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dc8bf00badd0 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-08-09 08:29 vmromanos New Issue
2016-08-09 08:29 vmromanos Assigned To => platform
2016-08-09 08:29 vmromanos Modules => Core
2016-08-09 08:29 vmromanos Triggers an Emergency Pack => No
2016-08-09 08:29 vmromanos Relationship added blocks 0033581
2016-10-11 11:17 inigosanchez Status new => scheduled
2016-10-11 11:17 inigosanchez Assigned To platform => inigosanchez
2016-10-14 12:53 inigosanchez Relationship added related to 0034209
2016-10-21 12:38 hgbot Checkin
2016-10-21 12:38 hgbot Note Added: 0090759
2016-10-21 12:42 hgbot Checkin
2016-10-21 12:42 hgbot Note Added: 0090760
2016-10-21 12:42 hgbot Status scheduled => resolved
2016-10-21 12:42 hgbot Resolution open => fixed
2016-10-21 12:42 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/306b87decaa619f8cbf637a7af1290afe68eb521 [^]
2016-10-21 12:46 inigosanchez Review Assigned To => caristu
2016-10-24 10:35 caristu Note Added: 0090806
2016-10-24 10:35 caristu Status resolved => new
2016-10-24 10:35 caristu Resolution fixed => open
2016-10-24 13:07 inigosanchez Status new => scheduled
2016-10-25 11:35 hgbot Checkin
2016-10-25 11:35 hgbot Note Added: 0090857
2016-10-25 11:36 hgbot Checkin
2016-10-25 11:36 hgbot Note Added: 0090858
2016-10-25 11:36 inigosanchez Status scheduled => resolved
2016-10-25 12:47 hgbot Checkin
2016-10-25 12:47 hgbot Note Added: 0090860
2016-10-25 12:55 caristu Note Added: 0090861
2016-10-25 12:55 caristu Status resolved => closed
2016-10-25 12:55 caristu Fixed in Version => 3.0PR17Q1
2016-10-25 15:16 hgbot Checkin
2016-10-25 15:16 hgbot Note Added: 0090866
2016-12-16 18:38 hudsonbot Checkin
2016-12-16 18:38 hudsonbot Note Added: 0092541
2016-12-16 18:38 hudsonbot Checkin
2016-12-16 18:38 hudsonbot Note Added: 0092554


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker