Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0035775 | Openbravo ERP | Y. DBSourceManager | public | 2017-04-12 15:05 | 2017-06-02 07:31 |
Reporter | AugustoMauch | ||||
Assigned To | AugustoMauch | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | 3.0PR17Q3 | |||
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 | 0035775: Triggers that are excluded from the model are not disabled during update.database in PostgreSQL | ||||
Description | Triggers are disabled during part of the update.database process (there are disabled here [1] and reenabled here [2]). In PostgreSQL only the triggers not excluded from the model are disabled [3] while in Oracle all the user triggers are disabled [4]. One consequence of not disabling all the triggers is that some might no longer be valid after updating the model. For instance, the Audit Trail triggers are excluded from the model, meaning that they will not be disabled during update.database, and that may result in the update.database failing. [1] https://code.openbravo.com/erp/devel/dbsm-main/file/f5fc17d37524/src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java#l219 [^] [2] https://code.openbravo.com/erp/devel/dbsm-main/file/f5fc17d37524/src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java#l247 [^] [3] https://code.openbravo.com/erp/devel/dbsm-main/file/f5fc17d37524/src/org/apache/ddlutils/platform/postgresql/PostgreSqlPlatform.java#l371 [^] [4] https://code.openbravo.com/erp/devel/dbsm-main/file/f5fc17d37524/src/org/apache/ddlutils/platform/oracle/Oracle8Platform.java#l252 [^] | ||||
Steps To Reproduce | As System Admin, in an activated instance: - Open the Tables and Columns window - Select the AD_COLUMN table. Set to true its Fully Audited flag. - Run the Update Audit Trail Infrastructure process to create the audit trigger in ad_column. - Apply the patch attached to the issue (it removes the ALLOWED_CROSS_ORG_LINK column from AD_COLUMN). - Run update.database. The following exception will be thrown: [java] 71928 INFO - Updating Application Dictionary data... [java] 71957 ERROR - Error while deleting from the database [java] org.postgresql.util.PSQLException: ERROR: record "old" has no field "allowed_cross_org_link" [java] Where: SQL statement "SELECT old.ALLOWED_CROSS_ORG_LINK" [java] PL/pgSQL function au_ad_column_trg() line 1558 at assignment [java] at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182) [java] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911) [java] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:173) [java] at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:622) [java] at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:472) [java] at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:429) [java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) [java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) [java] at org.apache.ddlutils.platform.PlatformImplBase.delete(PlatformImplBase.java:2301) [java] at org.apache.ddlutils.platform.PlatformImplBase.alterData(PlatformImplBase.java:818) [java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:231) [java] at org.openbravo.ddlutils.task.BaseDatabaseTask.execute(BaseDatabaseTask.java:86) [java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(AlterDatabaseJava.java:57) | ||||
Proposed Solution | Disable all the triggers, even the ones excluded from the model | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=10674&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2017-04-12 15:05 | AugustoMauch | New Issue | |||
2017-04-12 15:05 | AugustoMauch | Assigned To | => platform | ||
2017-04-12 15:05 | AugustoMauch | OBNetwork customer | => No | ||
2017-04-12 15:05 | AugustoMauch | Modules | => Core | ||
2017-04-12 15:05 | AugustoMauch | Triggers an Emergency Pack | => No | ||
2017-04-12 15:29 | AugustoMauch | File Added: deleteColumn.diff | |||
2017-04-12 15:29 | AugustoMauch | Assigned To | platform => AugustoMauch | ||
2017-04-12 15:29 | AugustoMauch | Status | new => scheduled | ||
2017-04-25 16:12 | AugustoMauch | Note Added: 0096160 | |||
2017-05-25 14:52 | AugustoMauch | Review Assigned To | => alostale | ||
2017-05-25 14:55 | hgbot | Checkin | |||
2017-05-25 14:55 | hgbot | Note Added: 0096804 | |||
2017-05-25 14:55 | hgbot | Status | scheduled => resolved | ||
2017-05-25 14:55 | hgbot | Resolution | open => fixed | ||
2017-05-25 14:55 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/dbsm-main/rev/248c39121a3bfba20c0dc621c8a8dc7d6e71aa84 [^] | ||
2017-05-25 14:55 | hgbot | Checkin | |||
2017-05-25 14:55 | hgbot | Note Added: 0096805 | |||
2017-05-25 14:55 | hgbot | Checkin | |||
2017-05-25 14:55 | hgbot | Note Added: 0096806 | |||
2017-05-25 14:55 | hgbot | Checkin | |||
2017-05-25 14:55 | hgbot | Note Added: 0096807 | |||
2017-05-25 14:55 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/dbsm-main/rev/248c39121a3bfba20c0dc621c8a8dc7d6e71aa84 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/715929ba6e4cf50633870e4d98bb04097a5f1bcb [^] | ||
2017-05-25 14:55 | hgbot | Checkin | |||
2017-05-25 14:55 | hgbot | Note Added: 0096808 | |||
2017-05-25 14:55 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/dbsm-main/rev/715929ba6e4cf50633870e4d98bb04097a5f1bcb [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/312e5d89376ca0001248f49b642991d8bf5feb37 [^] | ||
2017-05-25 14:57 | hgbot | Checkin | |||
2017-05-25 14:57 | hgbot | Note Added: 0096809 | |||
2017-05-25 14:57 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/dbsm-main/rev/312e5d89376ca0001248f49b642991d8bf5feb37 [^] => http://code.openbravo.com/erp/devel/pi/rev/2ea6fb210371eb9731922e891302983780143774 [^] | ||
2017-05-29 17:43 | hudsonbot | Checkin | |||
2017-05-29 17:43 | hudsonbot | Note Added: 0096990 | |||
2017-06-02 07:31 | alostale | Note Added: 0097087 | |||
2017-06-02 07:31 | alostale | Status | resolved => closed | ||
2017-06-02 07:31 | alostale | Fixed in Version | => 3.0PR17Q3 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|