Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0014157 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
design defect | [Openbravo ERP] Y. DBSourceManager | major | have not tried | 2010-08-10 12:27 | 2012-09-24 23:31 | |||||||
Reporter | marvintm | View Status | public | |||||||||
Assigned To | marvintm | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | scheduled | 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 | 0014157: Check constraints should be disabled so that oncreatedefaults can work correctly | |||||||||||
Description | Check constraints currently are enabled when a table is created, or recreated, and never disabled after that. This works correctly in case there are no oncreatedefaults which affect the columns in the check, but fails when an oncreatedefault is supposed to fill a column which is needed by a check constraint. Oncreatedefaults are executed at the end of the update process, after the Application Dictionary data has been updated. Therefore, there is a point in the update in which the check constraints could be temporarily violated (although the data would comply with the check at the end of the process). Thus, as it is currently, the process fails because the check constraint is activated at that point. | |||||||||||
Steps To Reproduce | - Create a check constraint which affects a newly created column in the AD (which has an oncreatedefault). - Install a module which doesn't have a value for that column. The process will fail. | |||||||||||
Proposed Solution | The solution is obviously to disable the check constraints while the Application Dictionary data is being updated. This solution was already adopted with NOT NULL constraints (which have basically the same problem), and it makes sense to do it also for check constraints. | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0029880) hgbot (developer) 2010-08-11 09:30 |
Repository: erp/devel/pi Changeset: 401aaff3c6f6f3df6d2bc9af012f5179e3967267 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Tue Aug 10 12:37:55 2010 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/401aaff3c6f6f3df6d2bc9af012f5179e3967267 [^] [licensce] Tier constraint implemented as trigger DB check constraint for tier has been implemeted as trigger, due to issue 14157 the constraints are enabled before oncreatedefault is applied, so it fails installing old commercial modules. --- M src-db/database/model/tables/AD_MODULE.xml M src-db/database/model/triggers/AD_MODULE_VERSION_TRG.xml --- |
(0029925) hudsonbot (developer) 2010-08-12 21:11 |
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/401aaff3c6f6 [^] Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/dd00ba1c00c6 [^] Tests: http://builds.openbravo.com/view/int/ [^] OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18116.obx [^] |
(0029983) hgbot (developer) 2010-08-16 09:58 |
Repository: erp/devel/dbsm-main Changeset: 2516e1a6419edc3b329d40147e3fbef00b199f8c Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Mon Aug 16 09:58:20 2010 +0200 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/2516e1a6419edc3b329d40147e3fbef00b199f8c [^] Reverted change related to issue 14020. Will do the change after the issue 14157 is fixed. --- M src/org/apache/ddlutils/platform/SqlBuilder.java --- |
(0029988) hgbot (developer) 2010-08-16 10:02 |
Repository: erp/devel/pi Changeset: 5faedaed0aafa587ca1f9e3302a86d2935a8fac5 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Mon Aug 16 10:02:04 2010 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/5faedaed0aafa587ca1f9e3302a86d2935a8fac5 [^] Reverted change related to issue 14020. Will do the change after the issue 14157 is fixed. --- M src-db/database/lib/dbsourcemanager.jar --- |
(0030037) hudsonbot (developer) 2010-08-16 22:29 |
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/5faedaed0aaf [^] Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/cb95e054be79 [^] Tests: http://builds.openbravo.com/view/int/ [^] OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18165.obx [^] |
(0044710) marvintm (developer) 2012-01-30 17:54 |
Although this change probably makes sense from a functional point of view, it would be very bad for performance reasons, and would also be very risky and likely to create regressions. Changing this issue to design defect. |
(0052486) AugustoMauch (administrator) 2012-09-24 23:31 |
Effort: 5 Impact: low Plan: mid |
Issue History | |||
Date Modified | Username | Field | Change |
2010-08-10 12:27 | marvintm | New Issue | |
2010-08-10 12:27 | marvintm | Assigned To | => marvintm |
2010-08-11 09:30 | hgbot | Checkin | |
2010-08-11 09:30 | hgbot | Note Added: 0029880 | |
2010-08-12 21:11 | hudsonbot | Checkin | |
2010-08-12 21:11 | hudsonbot | Note Added: 0029925 | |
2010-08-16 08:11 | alostale | Status | new => scheduled |
2010-08-16 09:58 | hgbot | Checkin | |
2010-08-16 09:58 | hgbot | Note Added: 0029983 | |
2010-08-16 10:02 | hgbot | Checkin | |
2010-08-16 10:02 | hgbot | Note Added: 0029988 | |
2010-08-16 22:29 | hudsonbot | Checkin | |
2010-08-16 22:29 | hudsonbot | Note Added: 0030037 | |
2012-01-30 17:54 | marvintm | Note Added: 0044710 | |
2012-01-30 17:54 | marvintm | Type | defect => design defect |
2012-09-10 15:50 | alostale | Relationship added | related to 0014020 |
2012-09-24 23:31 | AugustoMauch | Note Added: 0052486 | |
2012-09-24 23:31 | AugustoMauch | Priority | urgent => normal |
Copyright © 2000 - 2009 MantisBT Group |