Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035370Openbravo ERPY. DBSourceManagerpublic2017-02-27 18:092017-03-15 20:20
caristu 
caristu 
urgentminorhave not tried
closedfixed 
5
 
3.0PR17Q2 
alostale
Core
No
0035370: Partial Index information (comments) is not applied properly under some circumnstances
When launching an update database with the following changes in the model:

1) A new column
2) A new partial index for the new column
3) Changes in an existing column which forces table recreation

the partial index information is not updated in the column comments causing differences when exporting the model.
Reproduced in CI following the steps of this job: https://ci.openbravo.com/job/up-2.50topi-oracle/ [^]

1) hg up -C 2.50MP24
2) ant install.source
3) hg up up -C tip
4) ant smartbuild -Dlocal=no
5) put core in in development
6) ant export.database

The following line can be seen when looking for differences:

- <whereClause><![CDATA[AD_PROCESS_RUN_GROUP_ID IS NOT NULL]]></whereClause>
No tags attached.
related to feature request 0032211 closed caristu support for partial indexes 
Issue History
2017-02-27 18:09caristuNew Issue
2017-02-27 18:09caristuAssigned To => caristu
2017-02-27 18:09caristuModules => Core
2017-02-27 18:09caristuTriggers an Emergency Pack => No
2017-02-27 18:10caristuRelationship addedrelated to 0032211
2017-02-27 18:11caristuDescription Updatedbug_revision_view_page.php?rev_id=14687#r14687
2017-02-27 19:41caristuStatusnew => scheduled
2017-02-28 10:27hgbotCheckin
2017-02-28 10:27hgbotNote Added: 0094655
2017-02-28 10:27hgbotStatusscheduled => resolved
2017-02-28 10:27hgbotResolutionopen => fixed
2017-02-28 10:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/a0917e2fa2d4ab0c9d5fb0526fc273aa3ef4a3be [^]
2017-02-28 10:30hgbotCheckin
2017-02-28 10:30hgbotNote Added: 0094656
2017-02-28 10:30caristuReview Assigned To => alostale
2017-02-28 11:08shuehnerIssue Monitored: shuehner
2017-03-03 09:06alostaleNote Added: 0094714
2017-03-03 09:06alostaleStatusresolved => closed
2017-03-03 09:06alostaleFixed in Version => 3.0PR17Q2
2017-03-15 20:20hudsonbotCheckin
2017-03-15 20:20hudsonbotNote Added: 0095240

Notes
(0094655)
hgbot   
2017-02-28 10:27   
Repository: erp/devel/dbsm-main
Changeset: a0917e2fa2d4ab0c9d5fb0526fc273aa3ef4a3be
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Feb 28 10:26:34 2017 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/a0917e2fa2d4ab0c9d5fb0526fc273aa3ef4a3be [^]

fixes bug 35370: Partial Index info lost under some circumnstances using Oracle

Partial Index information was not being saved properly in Oracle, after executing update.database having the following changes in the model:

1) A new column
2) A new partial index for the new column
3) Changes in another column of the same table which forces recreation

In this scenario, the partial index information was being overriden after executing the writeColumnCommentStmt method. To fix this problem now we keep the existing column comments at that point and concatenate them with the comments to be added to the new column (if any).

Note that this fix does not affect when there is no recreation because in this case, the partial index comments will be handled with the AddIndexChange model changes.

---
M src-test/src/org/openbravo/dbsm/test/model/PartialIndexes.java
M src/org/apache/ddlutils/platform/SqlBuilder.java
M src/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java
A src-test/model/indexes/BASIC_PARTIAL_INDEX4.xml
---
(0094656)
hgbot   
2017-02-28 10:30   
Repository: erp/devel/pi
Changeset: 83679bd609bb5c4d14c4ae362836b3b1dd47efb5
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Feb 28 10:29:36 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/83679bd609bb5c4d14c4ae362836b3b1dd47efb5 [^]

related to bug 35370: updated dbsourcemanager library

---
M src-db/database/lib/dbsourcemanager.jar
---
(0094714)
alostale   
2017-03-03 09:06   
code reviewed + tested

No need to backport as it was creating only formal differences (in db column comments) in Oracle
(0095240)
hudsonbot   
2017-03-15 20:20   
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/54e102bef53e [^]
Maturity status: Test