Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0047694Openbravo ERPY. DBSourceManagerpublic2021-09-14 19:022021-10-07 12:34
rbianchini 
platform 
highmajoralways
closedfixed 
5
pi 
 
Core
No
0047694: ERROR with materialed views
ERROR with materialized views, when an update.database is performed
1)Create a Materialized View in PgAdmin
2)Do a REFRESH MATERIALIZED in PgAdmin
3)Do a Select count in PgAdmin
4)Go to the terminal and do an export.database
5)Verify that they have been exported correctly
6)Do an update.database
7)Select the view to verify if it has data ( RESULT: it has not data).
8)Do steps 2 and 3 again
9)Do step 6 again
10)Select the view to verify if it has data ( RESULT: it has not data).
No tags attached.
related to feature request 00420423.0PR20Q1 closed AugustoMauch Add support of materialized views 
Issue History
2021-09-14 19:02rbianchiniNew Issue
2021-09-14 19:02rbianchiniAssigned To => platform
2021-09-14 19:02rbianchiniModules => Core
2021-09-14 19:02rbianchiniRegression date => 2021-09-30
2021-09-14 19:02rbianchiniTriggers an Emergency Pack => No
2021-09-14 19:03rbianchiniNote Added: 0131792
2021-09-17 08:30ivancaceresIssue Monitored: ivancaceres
2021-09-20 13:04cbernerRegression date2021-09-30 =>
2021-09-21 14:31alostaleRelationship addedrelated to 0042042
2021-09-30 18:55hgbotNote Added: 0132089
2021-10-04 14:11lbressanNote Added: 0132142
2021-10-07 10:15hgbotNote Added: 0132238
2021-10-07 12:28hgbotNote Added: 0132250
2021-10-07 12:34hgbotResolutionopen => fixed
2021-10-07 12:34hgbotStatusnew => closed
2021-10-07 12:34hgbotNote Added: 0132251
2021-10-07 12:34hgbotNote Added: 0132252

Notes
(0131792)
rbianchini   
2021-09-14 19:03   
Here is the link to the video that reproduces the error:
https://drive.google.com/drive/u/0/folders/1KtZDFpPEODg_peyiHoBezUk3hNYEQMc2 [^]
(0132089)
hgbot   
2021-09-30 18:55   
Merge Request created: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/31 [^]
(0132142)
lbressan   
2021-10-04 14:11   
any update?
(0132238)
hgbot   
2021-10-07 10:15   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/438 [^]
(0132250)
hgbot   
2021-10-07 12:28   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/438 [^]
(0132251)
hgbot   
2021-10-07 12:34   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/dbsm [^]
Changeset: 2b19852e5d4a77c01adff341e274e0ae035860e7
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 2021-10-07T12:31:37+02:00
URL: https://gitlab.com/openbravo/product/dbsm/-/commit/2b19852e5d4a77c01adff341e274e0ae035860e7 [^]

Fixes ISSUE-47694: Materialized views are needlessly recreated on update.database

Now a materialized view will only be recreated if:

Its definition has changed
Depends on any view
Depends on any other materialized view
Depends on a function that will be deleted/recreated
Depends on a table that is going to be updated on the current update.database run

---
A src-test/model/materializedViews/BASE_MODEL_UPDATED_BASE_TABLE.xml
A src-test/model/materializedViews/BASE_MODEL_UPDATED_MATERIALIZED_VIEW.xml
A src-test/model/materializedViews/BASE_MODEL_WITH_FUNCTION_DEPENDENCY.xml
A src-test/model/materializedViews/BASE_MODEL_WITH_FUNCTION_DEPENDENCY_2.xml
A src-test/model/materializedViews/BASE_MODEL_WITH_FUNCTION_DEPENDENCY_UPDATED.xml
A src-test/model/materializedViews/BASE_MODEL_WITH_MATERIALIZED_VIEW_DEPENDENCY.xml
A src-test/model/materializedViews/BASE_MODEL_WITH_VIEW_DEPENDENCY.xml
A src-test/src/org/openbravo/dbsm/test/model/recreation/MaterializedView.java
A src/org/apache/ddlutils/alteration/RemoveMaterializedViewChange.java
M src-test/model/materializedViews/DEPENDENCY.xml
M src-test/src/org/openbravo/dbsm/test/model/MaterializedViews.java
M src-test/src/org/openbravo/dbsm/test/model/ModelSuite.java
M src/org/apache/ddlutils/alteration/ModelComparator.java
M src/org/apache/ddlutils/model/MaterializedView.java
M src/org/apache/ddlutils/platform/ModelLoaderBase.java
M src/org/apache/ddlutils/platform/SqlBuilder.java
M src/org/apache/ddlutils/platform/oracle/OracleModelLoader.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlModelLoader.java
---
(0132252)
hgbot   
2021-10-07 12:34   
Merge request merged: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/31 [^]