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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0014073
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Y. DBSourceManagermajorhave not tried2010-07-28 09:372010-08-18 00:00
ReportermarvintmView Statuspublic 
Assigned Tomarvintm 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision32653bcd1837
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0014073: DBSourceManager doesn't sort data changes properly before updating the database

DescriptionDBSourceManager generates a list of data changes when doing update.database, and then tries to apply them by transforming each of them into a SQL statement (INSERT, DELETE, or UPDATE), and executing them one by one.

To ensure proper functioning of this process when UNIQUE constraints are activated, the changes need to be sorted first, and then executed in the proper order (DELETEs first, then UPDATES, and then INSERTS). However, this sorting doesn't happen.
Steps To ReproduceModify one row in the AD_COLUMN file, by changing its ID to a smaller value, and execute update.database. A UNIQUE constraint will fail.
Proposed SolutionThe sorting needs to be done in update.database.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0029658)
hgbot (developer)
2010-07-29 10:29

Repository: erp/devel/dbsm-main
Changeset: ff4425b09c4b70900a5646f39a6ae6d4b102b8a2
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Jul 29 10:28:58 2010 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/ff4425b09c4b70900a5646f39a6ae6d4b102b8a2 [^]

Fixed issue 14073. Data changes will now be sorted before being applied.

---
M src/org/apache/ddlutils/alteration/DataComparator.java
---
(0029659)
hgbot (developer)
2010-07-29 10:33

Repository: erp/devel/pi
Changeset: 32653bcd18376b2cce82b2af5be21d15cfc6ee10
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Jul 29 10:29:47 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/32653bcd18376b2cce82b2af5be21d15cfc6ee10 [^]

Fixed issue 14073. Data changes will now be sorted before being applied.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0029670)
hudsonbot (developer)
2010-07-29 16:14

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/32653bcd1837 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/9e1bb4f5ae0b [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17932.obx [^]
(0030084)
shuehner (administrator)
2010-08-17 18:09

Tested on pi_pg, rev: e87917805d68.
Described use-case no works. Technical change did re-add two sorting calls which have been removed by some earlier commit by accident. -> Closing as fixed

- Issue History
Date Modified Username Field Change
2010-07-28 09:37 marvintm New Issue
2010-07-28 09:37 marvintm Assigned To => marvintm
2010-07-29 10:29 hgbot Checkin
2010-07-29 10:29 hgbot Note Added: 0029658
2010-07-29 10:29 hgbot Status new => resolved
2010-07-29 10:29 hgbot Resolution open => fixed
2010-07-29 10:29 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/ff4425b09c4b70900a5646f39a6ae6d4b102b8a2 [^]
2010-07-29 10:33 hgbot Checkin
2010-07-29 10:33 hgbot Note Added: 0029659
2010-07-29 10:33 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/dbsm-main/rev/ff4425b09c4b70900a5646f39a6ae6d4b102b8a2 [^] => http://code.openbravo.com/erp/devel/pi/rev/32653bcd18376b2cce82b2af5be21d15cfc6ee10 [^]
2010-07-29 16:14 hudsonbot Checkin
2010-07-29 16:14 hudsonbot Note Added: 0029670
2010-08-17 18:09 shuehner Note Added: 0030084
2010-08-17 18:09 shuehner Status resolved => closed
2010-08-18 00:00 anonymous sf_bug_id 0 => 3047307


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker