Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0034833 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2016-12-30 11:58 | 2017-03-15 20:19 | |||
Reporter | inigosanchez | View Status | public | |||||
Assigned To | inigosanchez | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 3.0PR17Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | f730600d5079 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | alostale | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0034833: audit triggers can have naming clashes | |||||||
Description | Triggers created for audit trail can have clashes in naming, causing incorrect auditing in these cases. This occurs because of the way name is generated [1], which doesn't validate there is no function nor trigger with the same name. [1] https://code.openbravo.com/erp/devel/pi/file/2a03b4d16b5d/src-db/database/model/postscript-PostgreSql.sql#l421 [^] | |||||||
Steps To Reproduce | 1. Log in as System Admin in an activated instance. 2. Open Table window and mark as audited OBKMO_Widget_Class_Menu and OBKMO_Widget_Class_Menu_Trl tables 3. Execute Update Audit Trail Infrastructure process 4. Check two triggers are created based on same function:
ERROR: this is incorrect, each trigger should have its own function 5. Execute Update Audit Trail Infrastructure process again ERROR: cannot drop function au_obkmo_widget_class_menu_trg() because other objects depend on it This occurs because function is tried to be dropped after dropping 1st trigger, but keeping 2nd one. | |||||||
Proposed Solution | After generating trigger name, validate it doesn't exist before creating, if it exists generate a different name till it doesn't exist. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|
![]() |
|
(0094080) hgbot (developer) 2017-02-06 12:57 |
Repository: erp/devel/pi Changeset: f730600d5079cc23e1e5e8254ec5de3949a8f6a4 Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com> Date: Mon Feb 06 12:56:44 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/f730600d5079cc23e1e5e8254ec5de3949a8f6a4 [^] Fixed issue 34833: audit triggers can have naming clashes The problem occurs because of the way audit trigger name is generated, which doesn't validate there is no function nor trigger with the same name. In order to fix this problem a validation is added. Now, this problem has been managed properly. --- M src-db/database/model/postscript-Oracle.sql M src-db/database/model/postscript-PostgreSql.sql --- |
(0094211) alostale (viewer) 2017-02-10 09:02 |
code reviewed tested ora + pg |
(0095161) hudsonbot (viewer) 2017-03-15 20:19 |
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 |
![]() |
|||
Date Modified | Username | Field | Change |
2016-12-30 11:58 | inigosanchez | New Issue | |
2016-12-30 11:58 | inigosanchez | Assigned To | => platform |
2016-12-30 11:58 | inigosanchez | File Added: errorAuditTrail.png | |
2016-12-30 11:58 | inigosanchez | OBNetwork customer | => No |
2016-12-30 11:58 | inigosanchez | Modules | => Core |
2016-12-30 11:58 | inigosanchez | Triggers an Emergency Pack | => No |
2016-12-30 12:18 | inigosanchez | Steps to Reproduce Updated | View Revisions |
2017-01-10 11:33 | alostale | Summary | Update Audit Trail Infrastructure process doesn't works properly under some circumstances => audit trigger can have naming clashes |
2017-01-10 11:33 | alostale | Description Updated | View Revisions |
2017-01-10 11:33 | alostale | Steps to Reproduce Updated | View Revisions |
2017-01-10 11:33 | alostale | Proposed Solution updated | |
2017-01-10 11:33 | alostale | Summary | audit trigger can have naming clashes => audit triggers can have naming clashes |
2017-01-10 11:34 | alostale | Status | new => acknowledged |
2017-01-10 11:43 | alostale | Priority | low => high |
2017-02-02 15:03 | inigosanchez | Status | acknowledged => scheduled |
2017-02-02 15:03 | inigosanchez | Assigned To | platform => inigosanchez |
2017-02-06 12:52 | inigosanchez | Review Assigned To | => alostale |
2017-02-06 12:57 | hgbot | Checkin | |
2017-02-06 12:57 | hgbot | Note Added: 0094080 | |
2017-02-06 12:57 | hgbot | Status | scheduled => resolved |
2017-02-06 12:57 | hgbot | Resolution | open => fixed |
2017-02-06 12:57 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/f730600d5079cc23e1e5e8254ec5de3949a8f6a4 [^] |
2017-02-10 09:02 | alostale | Note Added: 0094211 | |
2017-02-10 09:02 | alostale | Status | resolved => closed |
2017-02-10 09:02 | alostale | Fixed in Version | => 3.0PR17Q2 |
2017-03-15 20:19 | hudsonbot | Checkin | |
2017-03-15 20:19 | hudsonbot | Note Added: 0095161 |
Copyright © 2000 - 2009 MantisBT Group |