Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033787Openbravo ERPA. Platformpublic2016-08-24 10:252016-09-23 18:22
NaroaIriarte 
NaroaIriarte 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q4 
alostale
Core
No
0033787: Some PL functions need to be properly deleted and reviewed
The hex_to_int is_trigger_enabled functions are not deleted when an update.database is done, it would be nice to do it this way.
The instr function is showing a warning: warning:00000:6:DECLARE:unused variable "i".

This should be fixed also.
.
For the hex_to_int and is_trigger_enabled functions: drop the functions if they exist in the postscript-Oracle.sql and prescript-PostgreSql.sql classes.
For the instr function, remove the unused i variable.
No tags attached.
related to defect 0032932 closed NaroaIriarte There are a lot of warnings in the application that should be fixed 
Issue History
2016-08-24 10:25NaroaIriarteNew Issue
2016-08-24 10:25NaroaIriarteAssigned To => NaroaIriarte
2016-08-24 10:25NaroaIriarteModules => Core
2016-08-24 10:25NaroaIriarteTriggers an Emergency Pack => No
2016-08-24 10:26NaroaIriarteRelationship addedrelated to 0032932
2016-08-24 10:26NaroaIriarteReview Assigned To => alostale
2016-08-24 10:26NaroaIriarteStatusnew => acknowledged
2016-08-24 10:27NaroaIriarteStatusacknowledged => scheduled
2016-08-26 12:10NaroaIriarteNote Added: 0089442
2016-09-22 10:41hgbotCheckin
2016-09-22 10:41hgbotNote Added: 0090152
2016-09-22 10:41hgbotStatusscheduled => resolved
2016-09-22 10:41hgbotResolutionopen => fixed
2016-09-22 10:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/38d87f5ca8e1016f21cda73371157e8f5ba39d7c [^]
2016-09-23 08:16alostaleNote Added: 0090179
2016-09-23 08:16alostaleStatusresolved => closed
2016-09-23 08:16alostaleFixed in Version => 3.0PR16Q4
2016-09-23 18:22hudsonbotCheckin
2016-09-23 18:22hudsonbotNote Added: 0090214

Notes
(0089442)
NaroaIriarte   
2016-08-26 12:10   
The "hex_to_int" and "is_trigger_enabled" functions are kept in the excludeFilter.xml because they are needed to avoid the following errors when executing ant update.database:


[java] Error reading default values for parameters in function hex_to_int (pattern not found)
...

[java] java.lang.NullPointerException
     [java] at org.apache.ddlutils.model.Parameter.getName(Parameter.java:53)
     [java] at org.apache.ddlutils.platform.postgresql.PostgreSqlBuilder.writeParameter(PostgreSqlBuilder.java:476)
     [java] at org.apache.ddlutils.platform.postgresql.PostgreSqlBuilder.writeDropFunctionStmt(PostgreSqlBuilder.java:316)
     [java] at org.apache.ddlutils.platform.SqlBuilder.dropFunction(SqlBuilder.java:4040)
     [java] at org.apache.ddlutils.platform.postgresql.PostgreSqlBuilder.dropFunction(PostgreSqlBuilder.java:466)
     [java] at org.apache.ddlutils.platform.SqlBuilder.processChange(SqlBuilder.java:1336)
     ...
(0090152)
hgbot   
2016-09-22 10:41   
Repository: erp/devel/pi
Changeset: 38d87f5ca8e1016f21cda73371157e8f5ba39d7c
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu Sep 22 10:40:12 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/38d87f5ca8e1016f21cda73371157e8f5ba39d7c [^]

Fixed issue 33787: Some PL functions needed to be properly removed

The hex_to_int and is_trigger_enabled functions were not properly removed, it was neccessary to do an install.source to have them properly removed. Now these functios are removed if they exist when an update is done.

---
M src-db/database/model/postscript-Oracle.sql
M src-db/database/model/prescript-PostgreSql.sql
---
(0090179)
alostale   
2016-09-23 08:16   
code reviewed

tested in oracle and pg:

1. When updating from an old version when those functions are present, they get properly removed on update
2. When updating from a newer version when those functions don't exist, there is no error
(0090214)
hudsonbot   
2016-09-23 18:22   
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/25f7de2ab346 [^]
Maturity status: Test