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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030720
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformtrivialhave not tried2015-09-01 16:222016-07-06 12:07
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q4
StatusclosedFix in branchFixed in SCM revisionf41aa6109535
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030720: Cleanup unused variables in pl-functions & triggers (platform part)

DescriptionThere are quite a few variables declared in in pl-functions & -triggers which are never used.

Those should be cleaned up.

Note: found using static analysis using plpgsql_check

This issue is split out of 27432 and handles part of platform team.
Steps To ReproduceRun plpgsql_check_function on all functions + trigger
And review output.
Proposed SolutionDelete the unused variables.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0027432 closedSanjota Cleanup unused variables in pl-functions & triggers 
related to defect 0033422 closedSanjota Static code analysis: triggers 

-  Notes
(0080009)
shuehner (administrator)
2015-09-02 10:05

Notes for review:
All cases have been found by plpgsql_check static analysis tool but then also manually verified by checking the .xml source file in an editor.

And for each case search for the allegedly unused variable in all file to verify it is not used at all

That same procedure can be used to verify that the deleted variables are in fact not used.

NOTE: search must be done case-insensitive as pl does allow that when using variables.
(0080011)
hgbot (developer)
2015-09-02 10:07

Repository: erp/devel/pi
Changeset: f41aa6109535a38a4d9161649f2fd1de4d987390
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Tue Sep 01 16:28:36 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f41aa6109535a38a4d9161649f2fd1de4d987390 [^]

Fixed 30720. Remove most unused variables from pl functions & triggers.

That takes care of the big bunch of those warnings keeping only the ones
having some special case to be looked at in more detail.

All found using plpgsql_check tool.

---
M modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_AD_FIELD_MOD_TRG.xml
M modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_MENU_PARAM_MOD_TRG.xml
M modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_PARAMETER_MOD_TRG.xml
M modules/org.openbravo.client.kernel/src-db/database/model/triggers/OBCLKER_TEMPLATE_DEPEND_TRG.xml
M modules/org.openbravo.client.myob/src-db/database/model/triggers/OBKMO_WIDGET_CLASS_MOD_TRG.xml
M modules/org.openbravo.client.myob/src-db/database/model/triggers/OBKMO_WIDGET_URL_MOD_TRG.xml
M modules/org.openbravo.service.datasource/src-db/database/model/triggers/OBSERDS_DATASOURCE_FIELD_TRG.xml
M modules/org.openbravo.userinterface.selector/src-db/database/model/triggers/OBUISEL_SELECTOR_FLD_MOD_TRG.xml
M modules/org.openbravo.userinterface.selector/src-db/database/model/triggers/OBUISEL_SELECTOR_TRL_TRG.xml
M src-db/database/model/functions/AD_COLUMN_IDENTIFIER_REF_SQL.xml
M src-db/database/model/functions/AD_COLUMN_IDENTIFIER_SQL.xml
M src-db/database/model/functions/AD_GETTAB_FROM_TABLE.xml
M src-db/database/model/functions/AD_GET_NODE_TREE_BYLEVEL.xml
M src-db/database/model/functions/AD_ORG_READY.xml
M src-db/database/model/functions/AD_TABLE_IMPORT.xml
M src-db/database/model/functions/AD_TAB_COPY.xml
M src-db/database/model/functions/AD_TAB_IMPORT.xml
M src-db/database/model/prescript-PostgreSql.sql
M src-db/database/model/triggers/AD_EP_PROCEDURES_MOD_TRG.xml
M src-db/database/model/triggers/AD_EXTENSION_POINT_MOD_TRG.xml
M src-db/database/model/triggers/AD_MENU_TRG.xml
M src-db/database/model/triggers/AD_MODULE_TRG.xml
M src-db/database/model/triggers/AD_MODULE_TRG2.xml
M src-db/database/model/triggers/AD_ORG_TRG.xml
---
(0080311)
alostale (manager)
2015-09-10 10:25
edited on: 2015-09-10 10:29

code reviewed

additional test was performed:

1. In an Oracle instance invoke: call dba_recompile(null)
2. Check dbsm output -> "All valid" message is shown
3. Check all objects are in valid status

In case any used variable would have been deleted this would have been the result of the test:

* dbsm output would have informed about the invalid object
* an error like "Error(42,34): PLS-00201: identifier 'V_DATENULL' must be declared" would be seen for those objects


- Issue History
Date Modified Username Field Change
2015-09-01 16:22 shuehner New Issue
2015-09-01 16:22 shuehner Assigned To => shuehner
2015-09-01 16:22 shuehner Modules => Core
2015-09-01 16:22 shuehner Triggers an Emergency Pack => No
2015-09-01 16:22 shuehner Issue generated from 0027432
2015-09-01 16:22 shuehner Relationship added related to 0027432
2015-09-02 10:05 shuehner Note Added: 0080009
2015-09-02 10:06 shuehner Review Assigned To => alostale
2015-09-02 10:07 hgbot Checkin
2015-09-02 10:07 hgbot Note Added: 0080011
2015-09-02 10:07 hgbot Status new => resolved
2015-09-02 10:07 hgbot Resolution open => fixed
2015-09-02 10:07 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f41aa6109535a38a4d9161649f2fd1de4d987390 [^]
2015-09-10 10:25 alostale Note Added: 0080311
2015-09-10 10:25 alostale Status resolved => closed
2015-09-10 10:25 alostale Fixed in Version => 3.0PR15Q4
2015-09-10 10:29 alostale Note Edited: 0080311 View Revisions
2016-07-06 12:07 vmromanos Relationship added related to 0033422


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker