Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034236Openbravo ERPY. DBSourceManagerpublic2016-10-19 10:232016-12-16 18:39
highminorhave not tried
0034236: newIndexesPostAction is executing duplicated actions
At this point[1] newIndexesPostAction is being executed once per table. Each execution contains the map of new indexes even if those indexes does not belong to the current table in the loop.

This causes that the post actions (for example creating new comments) are being executed once per table, but they should be executed just once.

[1] [^]
Execute the attached test case (testCase34236.diff) which does the following:

1) Creates a model with two tables
2) Prints the statements needed to add a new function based index with an operator class into ONE table of the model

Notice that the following statement is executed twice (once per table in the model):

COMMENT ON TABLE TEST IS 'OP_CLASS_INDEX1.functionBasedColumn.operatorClass=varchar_pattern_ops$'

It should be executed once as we are adding a new index to just one of the tables
Send to new newIndexesPostAction a list of the new indexes of the current table in the loop
related to feature request 0030525 closed AugustoMauch Provide support in DBSourceManager to define an operator class in index columns 
related to feature request 0032211 closed caristu support for partial indexes 
diff issue34236.diff (4,802) 2016-10-19 10:29
diff testCase34236.diff (3,849) 2016-10-19 10:41
Issue History
2016-10-19 10:23caristuNew Issue
2016-10-19 10:23caristuAssigned To => platform
2016-10-19 10:23caristuModules => Core
2016-10-19 10:23caristuTriggers an Emergency Pack => No
2016-10-19 10:27caristuDescription Updatedbug_revision_view_page.php?rev_id=13407#r13407
2016-10-19 10:28caristuRelationship addedrelated to 0030525
2016-10-19 10:28caristuRelationship addedrelated to 0032211
2016-10-19 10:29caristuFile Added: issue34236.diff
2016-10-19 10:30caristuNote Added: 0090694
2016-10-19 10:30caristuNote Edited: 0090694bug_revision_view_page.php?bugnote_id=0090694#r13409
2016-10-19 10:41caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13411#r13411
2016-10-19 10:41caristuFile Added: testCase34236.diff
2016-10-19 10:42caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13412#r13412
2016-10-19 10:43caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13413#r13413
2016-10-31 18:56caristuTag Attached: Performance
2016-12-01 13:02alostaleStatusnew => acknowledged
2016-12-01 13:20alostalePriorityhigh => normal
2016-12-01 14:01alostalePrioritynormal => high
2016-12-01 14:13alostaleAssigned Toplatform => caristu
2016-12-02 10:26hgbotCheckin
2016-12-02 10:26hgbotNote Added: 0092012
2016-12-02 10:26hgbotStatusacknowledged => resolved
2016-12-02 10:26hgbotResolutionopen => fixed
2016-12-02 10:26hgbotFixed in SCM revision => [^]
2016-12-02 10:34hgbotCheckin
2016-12-02 10:34hgbotNote Added: 0092014
2016-12-02 10:35caristuReview Assigned To => alostale
2016-12-13 11:23alostaleNote Added: 0092309
2016-12-13 11:23alostaleStatusresolved => closed
2016-12-13 11:23alostaleFixed in Version => 3.0PR17Q1
2016-12-16 18:39hudsonbotCheckin
2016-12-16 18:39hudsonbotNote Added: 0092684

2016-10-19 10:30   
Attached patch with the proposed solution

2016-12-02 10:26   
Repository: erp/devel/dbsm-main
Changeset: cb46c26bac25b58f43d8102538ae757fb7c343ac
Author: Carlos Aristu <carlos.aristu <at>>
Date: Fri Dec 02 10:24:32 2016 +0100
URL: [^]

fixes issue 34236: newIndexesPostAction is executing duplicated actions

This refactor allows to execute the new index post actions just once per table in the model. Added a new test case also to add coverage to this scenario.

M src-test/src/org/openbravo/dbsm/test/model/
M src/org/apache/ddlutils/platform/
M src/org/apache/ddlutils/platform/oracle/
A src-test/model/indexes/MODEL_WITH_TWO_TABLES.xml
A src-test/model/indexes/MODEL_WITH_TWO_TABLES_AND_INDEX.xml
2016-12-02 10:34   
Repository: erp/devel/pi
Changeset: 0fba1fd4f0761c0dc6fbeb52b6034300e6b4b309
Author: Carlos Aristu <carlos.aristu <at>>
Date: Fri Dec 02 10:33:48 2016 +0100
URL: [^]

related to issue 34236: updated dbsourcemanager library

M src-db/database/lib/dbsourcemanager.jar
2016-12-13 11:23   
code reviewed and tested
2016-12-16 18:39   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test