Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033647Openbravo ERPA. Platformpublic2016-08-08 10:012016-08-08 13:10
vmromanos 
platform 
normalmajoralways
closedno change required 
5
 
 
vmromanos
Core
No
0033647: New function in index doesn't work (Oracle only)
New created functions included in an index are not working fine in Oracle only.

The update process seems to be changing the function name; original function name is "EQUALS", but it seems to be changed to "OGC_EQUALS":


Finished preparing SQL
SQL Command failed with: ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_EQUALS'
ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_EQUALS'

-- END
CREATE INDEX FIN_PAYMENT_BP_CREDIT_IX ON FIN_PAYMENT (C_BPARTNER_ID, EQUALS(GENERATED_CREDIT, USED_CREDIT))
Executed 13189 SQL command(s) with 1 error(s)
1. Apply the attached patch in issue 0033581. It defines a function EQUALS 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 the error message in Description section is shown.

Please note that this code is working fine for Postgresql (9.3)
No tags attached.
blocks defect 00335813.0PR17Q2 closed vmromanos slow defaults retrieval in add payment 
Issue History
2016-08-08 10:01vmromanosNew Issue
2016-08-08 10:01vmromanosAssigned To => platform
2016-08-08 10:01vmromanosModules => Core
2016-08-08 10:01vmromanosTriggers an Emergency Pack => No
2016-08-08 10:02vmromanosRelationship addedblocks 0033581
2016-08-08 11:39alostaleNote Added: 0088880
2016-08-08 11:39alostaleStatusnew => closed
2016-08-08 11:39alostaleResolutionopen => no change required
2016-08-08 11:40alostaleNote Edited: 0088880bug_revision_view_page.php?bugnote_id=0088880#r12804
2016-08-08 12:55vmromanosNote Added: 0088885
2016-08-08 12:55vmromanosStatusclosed => new
2016-08-08 12:55vmromanosResolutionno change required => open
2016-08-08 13:10vmromanosNote Deleted: 0088885
2016-08-08 13:10vmromanosReview Assigned To => vmromanos
2016-08-08 13:10vmromanosNote Added: 0088888
2016-08-08 13:10vmromanosStatusnew => closed
2016-08-08 13:10vmromanosResolutionopen => no change required

Notes
(0088880)
alostale   
2016-08-08 11:39   
(edited on: 2016-08-08 11:40)
The problem is caused because EQUALS is an internal Oracle function, if you run this before applying the patch, this is the result you get:

SQL> desc equals
FUNCTION equals RETURNS NUMBER(38)
 Argument Name			Type			In/Out Default?
 ------------------------------ ----------------------- ------ --------
 G1				ST_GEOMETRY		IN
 G2				ST_GEOMETRY		IN

Proposal, change function name.

(0088888)
vmromanos   
2016-08-08 13:10   
Wrongly reopened