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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0014183
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Y. DBSourceManagerminoralways2010-08-13 13:312010-09-18 00:00
ReporternetworkbView Statuspublic 
Assigned Tomarvintm 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision0343104474d0
ProjectionnoneETAnoneTarget Version2.50MP22
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product Version2.50MP20SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0014183: error in update.database when exists lines without indent

Descriptionwhen a function database, there are lines without indent, the process update.database returns an error
Steps To Reproduce. create next function in database:
CREATE OR REPLACE FUNCTION TEST_PR(OUT aprobado character varying, IN p_pinstance_id character varying)
  RETURNS character varying AS

$BODY$ DECLARE
v_Message VARCHAR(2000):=''; -- will contain the final message to be logged
v_ResultStr VARCHAR(2000):=''; -- will contain text describing the stage the stored procedure is in
BEGIN


RAISE NOTICE '%','Updating PInstance - Finished ' || v_Message ;
PERFORM AD_UPDATE_PINSTANCE(p_pinstance_id, NULL, 'N', 1, v_Message) ;
RETURN;

EXCEPTION
 WHEN OTHERS THEN
   v_ResultStr:= '@Error=' || SQLERRM;
   RAISE NOTICE '%',v_ResultStr ;
   PERFORM AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
   RETURN;
END ;

$BODY$
  LANGUAGE 'plpgsql' VOLATILE
  COST 100;
ALTER FUNCTION TEST_PR(character varying) OWNER TO tad_250mp14;

. run export.database

. run update.database
Proposed Solution. add several spaces, in the start of the lines
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0030645)
marvintm (developer)
2010-09-06 13:38

I've created the function as it was provided, and unfortunately the issue didn't reproduce. The function was exported with correct Oracle syntax, and the update.database ran without trouble.

I know that this issue at some point happened, but we need to find a way to reproduce it reliably.
(0031020)
hgbot (developer)
2010-09-14 09:33

Repository: erp/devel/pi
Changeset: 1d0e1fd77ec2bdf20e06b110fe196e2d6b0f00a8
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Sep 13 19:33:03 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1d0e1fd77ec2bdf20e06b110fe196e2d6b0f00a8 [^]

Fixed issue 14183. Translation for DBMS_OUTPUT structures will work even when there is no indentation.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0031021)
hgbot (developer)
2010-09-14 09:51

Repository: erp/devel/dbsm-main
Changeset: 0343104474d0aebf909855a82cce5382f34109b6
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Sep 13 19:30:01 2010 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/0343104474d0aebf909855a82cce5382f34109b6 [^]

Fixed issue 14183. Translation for DBMS_OUTPUT structures will work even when there is no indentation.

---
M src/org/apache/ddlutils/platform/postgresql/ChangeFunction2Translation.java
---
(0031023)
marvintm (developer)
2010-09-14 10:04

1 note about the fix: the change done has been the less intrusive one possible, to minimize the probability of producing a regression when changing the PLSQL translation code. Therefore, the provided function will work, but it will be created in PostgreSQL with the two lines without indentation being translated into a single line of code. The syntax is correct, and although the generated code is not completely nice, it will work.
(0031114)
hudsonbot (developer)
2010-09-15 20:55

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/1d0e1fd77ec2 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/80bfed94a6e8 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18410.obx [^]
(0031198)
shuehner (administrator)
2010-09-17 17:04

Tested on pi/psql. Change is postgres specific and as the our translation consistency check and normal db-consistency tests on hudson run fine -> No need for special testing on oracle.
Tested specified function with export/update cycle -> Working fine now. Review of diff shows changed regex will only affect leading spaces of lines containing dbms_output -> very localized -> Closing as fixed.

- Issue History
Date Modified Username Field Change
2010-08-13 13:31 networkb New Issue
2010-08-13 13:31 networkb Assigned To => marvintm
2010-08-16 08:06 alostale Status new => scheduled
2010-08-16 08:06 alostale fix_in_branch => pi
2010-09-06 13:38 marvintm Note Added: 0030645
2010-09-06 13:38 marvintm Status scheduled => feedback
2010-09-14 09:33 hgbot Checkin
2010-09-14 09:33 hgbot Note Added: 0031020
2010-09-14 09:33 hgbot Status feedback => resolved
2010-09-14 09:33 hgbot Resolution open => fixed
2010-09-14 09:33 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1d0e1fd77ec2bdf20e06b110fe196e2d6b0f00a8 [^]
2010-09-14 09:51 hgbot Checkin
2010-09-14 09:51 hgbot Note Added: 0031021
2010-09-14 09:51 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/1d0e1fd77ec2bdf20e06b110fe196e2d6b0f00a8 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/0343104474d0aebf909855a82cce5382f34109b6 [^]
2010-09-14 10:04 marvintm Note Added: 0031023
2010-09-15 20:55 hudsonbot Checkin
2010-09-15 20:55 hudsonbot Note Added: 0031114
2010-09-17 17:04 shuehner Note Added: 0031198
2010-09-17 17:04 shuehner Status resolved => closed
2010-09-18 00:00 anonymous sf_bug_id 0 => 3069533


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker