Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014235Openbravo ERPA. Platformpublic2010-08-18 13:552010-10-30 11:24
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
pi 
 
Core
No
0014235: Missing order by clause in Field_data.xsql selectDefaultValue method
The Wad engine calls the sql-query defined in FieldsData.selectDefaultValues twice and assumes that the rows are returned in the same order (as one call generates a java-function and the second call generates the call to this function (and the order of parameters needs to agree)).

The order of returned rows is not guaranteed to be stable without the order by clause showing itself in two problems:

- diffing srcAD with two different runs of compile.complete shows unneeded differences (harmless but annoying)
- sometimes (i.e. when changing Wad to be multi-threaded) the order is different inside one compile.complete run leaving to compile error of the generated files
No tags attached.
has duplicate defect 0011752 closed alostale Default values of WAD generated windows do not work always. 
diff 14235.diff (530) 2010-08-18 13:56
https://issues.openbravo.com/file_download.php?file_id=2880&type=bug
Issue History
2010-08-18 13:55shuehnerNew Issue
2010-08-18 13:55shuehnerAssigned To => shuehner
2010-08-18 13:56shuehnerFile Added: 14235.diff
2010-08-30 09:02alostaleStatusnew => scheduled
2010-10-24 23:14hgbotCheckin
2010-10-24 23:14hgbotNote Added: 0032146
2010-10-24 23:14hgbotStatusscheduled => resolved
2010-10-24 23:14hgbotResolutionopen => fixed
2010-10-24 23:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8fe20cfac1483a258e3a6da99c937c0ee45cfb68 [^]
2010-10-25 10:13marvintmNote Added: 0032164
2010-10-25 10:13marvintmStatusresolved => closed
2010-10-25 19:37hudsonbotCheckin
2010-10-25 19:37hudsonbotNote Added: 0032192
2010-10-30 11:24anonymoussf_bug_id0 => 3098727
2012-03-29 17:14shuehnerRelationship addedhas duplicate 0011752

Notes
(0032146)
hgbot   
2010-10-24 23:14   
Repository: erp/devel/pi
Changeset: 8fe20cfac1483a258e3a6da99c937c0ee45cfb68
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Sun Oct 24 23:13:50 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8fe20cfac1483a258e3a6da99c937c0ee45cfb68 [^]

Fixed 14235: Missing order by clause in Field_data.xsql selectDefaultValue
Which does lead to compile-errors in some cases if db result-order returned by
two calls to the method (with same parameters) differs

---
M src-wad/src/org/openbravo/wad/Fields_data.xsql
---
(0032164)
marvintm   
2010-10-25 10:13   
Code-reviewed. Verified that the previous non-order is not a factor due to how the query is used, and that the change will produce a consistent order from now on.
(0032192)
hudsonbot   
2010-10-25 19:37   
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/8fe20cfac148 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/8e23f326cade [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18733.obx [^]