Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0044892 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] Y. DBSourceManager | minor | N/A | 2020-08-26 10:28 | 2022-11-03 12:41 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | high | Resolution | fixed | Fixed in Version | PR23Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0044892: On install.source config scripts are applied in two steps | |||||||
Description | On install.source config scripts are applied in two steps: 1. creates the DB without applying scripts [1] 2. applies the config scripts This two step process may be problematic, in particular in Oracle if the config script is making changes in columns that participate in functional indexes. In that case Oracle does not allow to change the column (in step 2) as reported in issue 0044612. [1] https://gitlab.com/openbravo/projects/platform/dbsm/-/blob/master/src/org/openbravo/ddlutils/task/CreateDatabase.java#L124 [^] | |||||||
Steps To Reproduce | 1- Modify on a template a column that is used in functional index. For example the column name of C_BPartner: <columnSizeChange tablename="C_BPARTNER" columnname="NAME" newSize="120" oldSize="60"/> 2- run ant install.source ERROR: ORA-30556 | |||||||
Proposed Solution | 1) Review if there is any reason why we are doing this in two steps (historical reasons?) 2) Read the whole model at once including the config scripts and create the database with all the information in a shot | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||||||||||||||||
|
Notes | |
(0142631) hgbot (developer) 2022-10-27 09:40 |
Merge Request created: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/36 [^] |
(0142700) hgbot (developer) 2022-10-28 08:27 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/743 [^] |
(0142870) hgbot (developer) 2022-11-03 12:40 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/dbsm [^] Changeset: 8a88bde77869ec36162052d118c4069980732813 Author: Asier Lostalé <asier.lostale@openbravo.com> Date: 03-11-2022 11:24:30 URL: https://gitlab.com/openbravo/product/dbsm/-/commit/8a88bde77869ec36162052d118c4069980732813 [^] fixes ISSUE-44892: on DB creation config scripts are applied in two steps When creating database, the database model was created in two steps: 1. model creation without taking into account config scripts 2. config script changes (model and data) were applied This can cause different problems. Now the process is more like: 1. read in memory model without config script changes 2. read config script model changes and apply them in memory model 3. create complete model in DB 4. read and apply data in DB without config script changes 5. read and apply in DB data config script changes --- M src/org/openbravo/ddlutils/task/CreateDatabase.java --- |
(0142873) hgbot (developer) 2022-11-03 12:40 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/dbsm [^] Changeset: 40ea1bfdbbe63ee46c2a360a6fd63f0d7bf00800 Author: Asier Lostalé <asier.lostale@openbravo.com> Date: 03-11-2022 12:34:31 URL: https://gitlab.com/openbravo/product/dbsm/-/commit/40ea1bfdbbe63ee46c2a360a6fd63f0d7bf00800 [^] fixes ISSUE-44892: on DB creation config scripts are applied in two steps When creating database, the database model was created in two steps: 1. model creation without taking into account config scripts 2. config script changes (model and data) were applied This can cause different problems. Now the process is more like: 1. read in memory model without config script changes 2. read config script model changes and apply them in memory model 3. create complete model in DB 4. read and apply data in DB without config script changes 5. read and apply in DB data config script changes --- A src-test/model/configScripts/BASE_MODEL_FUNCT_IDX.xml A src-test/model/configScripts/BASE_MODEL_VIEW.xml A src/org/openbravo/ddlutils/process/DBCreator.java M src-test/src/org/openbravo/dbsm/test/base/DbsmTest.java M src-test/src/org/openbravo/dbsm/test/configscript/ConfigScriptColumnSizeChange.java M src/org/openbravo/ddlutils/process/DBUpdater.java M src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java M src/org/openbravo/ddlutils/task/AlterXML2SQL.java M src/org/openbravo/ddlutils/task/BaseDatabaseTask.java M src/org/openbravo/ddlutils/task/CreateDatabase.java M src/org/openbravo/ddlutils/task/DatabaseUtils.java --- |
(0142874) hgbot (developer) 2022-11-03 12:40 |
Merge request merged: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/36 [^] |
(0142876) hgbot (developer) 2022-11-03 12:41 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/743 [^] |
(0142877) hgbot (developer) 2022-11-03 12:41 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: 7707245518817c0416ef2fec0bad00d11c2afa56 Author: Asier Lostalé <asier.lostale@openbravo.com> Date: 03-11-2022 11:40:32 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/7707245518817c0416ef2fec0bad00d11c2afa56 [^] fixes ISSUE-44892: on DB creation config scripts are applied in two steps When creating database, the database model was created in two steps: 1. model creation without taking into account config scripts 2. config script changes (model and data) were applied This can cause different problems. Now the process is more like: 1. read in memory model without config script changes 2. read config script model changes and apply them in memory model 3. create complete model in DB 4. read and apply data in DB without config script changes 5. read and apply in DB data config script changes --- M src-db/database/lib/dbsourcemanager.jar --- |
Issue History | |||
Date Modified | Username | Field | Change |
2020-08-26 10:28 | caristu | New Issue | |
2020-08-26 10:28 | caristu | Assigned To | => platform |
2020-08-26 10:28 | caristu | Modules | => Core |
2020-08-26 10:28 | caristu | Triggers an Emergency Pack | => No |
2020-08-26 10:28 | caristu | Relationship added | related to 0044612 |
2020-08-26 11:29 | caristu | Description Updated | View Revisions |
2020-08-26 11:43 | caristu | Issue cloned | 0044896 |
2020-08-26 11:43 | caristu | Relationship added | related to 0044896 |
2020-08-26 14:41 | shuehner | Relationship added | related to 0044901 |
2020-10-29 13:48 | alostale | Relationship added | related to 0045318 |
2022-02-01 07:24 | alostale | Assigned To | platform => Triage Platform Base |
2022-10-27 09:40 | hgbot | Note Added: 0142631 | |
2022-10-28 08:27 | hgbot | Note Added: 0142700 | |
2022-11-02 07:36 | alostale | Assigned To | Triage Platform Base => alostale |
2022-11-02 07:37 | alostale | Status | new => scheduled |
2022-11-03 12:40 | hgbot | Resolution | open => fixed |
2022-11-03 12:40 | hgbot | Status | scheduled => closed |
2022-11-03 12:40 | hgbot | Note Added: 0142870 | |
2022-11-03 12:40 | hgbot | Note Added: 0142873 | |
2022-11-03 12:40 | hgbot | Note Added: 0142874 | |
2022-11-03 12:41 | hgbot | Note Added: 0142876 | |
2022-11-03 12:41 | hgbot | Fixed in Version | => PR23Q1 |
2022-11-03 12:41 | hgbot | Note Added: 0142877 | |
2022-11-04 09:22 | alostale | Relationship added | causes 0050729 |
Copyright © 2000 - 2009 MantisBT Group |