Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034209Openbravo ERPA. Platformpublic2016-10-14 12:522016-11-22 09:52
inigosanchez 
platform 
normalminorhave not tried
closedduplicate 
5
 
 
caristu
Core
No
0034209: DB consistency error with function index with 2 or more parameters separated by blank space or not
A 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. See attached file: try-dbcons-oracle-differences.
1.- 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.

*Note than functionExpression is defined with a blank space between parameters:
+ <index-column name="functionBasedColumn" functionExpression="OBEQUALS(GENERATED_CREDIT, USED_CREDIT)"/>

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. This creates a db consistency problem

Please note that this code is working fine for Postgresql (9.3)

Otherwise, If you define this functionExpression without blank space between parameters, the problem is raised in db consistency of postgresql:

*For this case functionExpression is defined without a blank space between parameters:
+ <index-column name="functionBasedColumn" functionExpression="OBEQUALS(GENERATED_CREDIT,USED_CREDIT)"/>

Repeat steps defined above. See attached file to see the results of the export database: try-dbcons-pgsql-differences
No tags attached.
duplicate of defect 0034488 closed caristu Unsolvable dbconsistency problems in index functions 
related to defect 0033659 closed inigosanchez DB consistency error with function index (Oracle only) 
? try-dbcons-oracle-differences (858) 2016-10-14 12:52
https://issues.openbravo.com/file_download.php?file_id=9914&type=bug
? try-dbcons-pgsql-differences (855) 2016-10-17 14:01
https://issues.openbravo.com/file_download.php?file_id=9920&type=bug
Issue History
2016-10-14 12:52inigosanchezNew Issue
2016-10-14 12:52inigosanchezAssigned To => platform
2016-10-14 12:52inigosanchezFile Added: try-dbcons-oracle-differences
2016-10-14 12:52inigosanchezModules => Core
2016-10-14 12:52inigosanchezTriggers an Emergency Pack => No
2016-10-14 12:53inigosanchezRelationship addedrelated to 0033659
2016-10-14 12:53inigosanchezSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13370#r13370
2016-10-17 14:01inigosanchezSummaryDB consistency error with function index with 2 or more parameters separated by blank space (Oracle only) => DB consistency error with function index with 2 or more parameters separated by blank space or not
2016-10-17 14:01inigosanchezDescription Updatedbug_revision_view_page.php?rev_id=13383#r13383
2016-10-17 14:01inigosanchezSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13384#r13384
2016-10-17 14:01inigosanchezFile Added: try-dbcons-pgsql-differences
2016-11-22 09:52inigosanchezReview Assigned To => caristu
2016-11-22 09:52inigosanchezRelationship addedduplicate of 0034488
2016-11-22 09:52inigosanchezStatusnew => closed
2016-11-22 09:52inigosanchezResolutionopen => duplicate

There are no notes attached to this issue.