Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0036226 | Openbravo ERP | A. Platform | public | 2017-06-12 13:17 | 2018-03-14 04:59 | |||||||
Reporter | shuehner | |||||||||||
Assigned To | AugustoMauch | |||||||||||
Priority | urgent | Severity | minor | Reproducibility | have not tried | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | 3.0PR18Q2 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | caristu | |||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0036226: On first install.source don't show SQLException when 'drop role' tries to delete a role which does not exist | |||||||||||
Description | In short: Some SQL commands at start of create.database are allowed to fail with the process continuing. However SQLException are shown which are confusing + annoying to log-checking and should be avoided. First part of create.database (and indirectly install.source) is to delete + recreate the role + database by doing: 1.) drop database if not exists 2.) drop role 3.) create role 4.) create database Config is that steps 1-3 can fail but step 4 must suceed. Failure of 1+2 can be because first install and both user+role do not exist Failure of 2+3 are possible (at least on postgres) by sharing a user for >=2 databases. Then while dropping db1 + then trying to drop the user this will fail as the 2nd database still exists. Consequently then the create role will also fail as the 'old' role still exists. The error messages shown in this case are acceptable. However all that above are issues which are already 'correctly' ignored as if the main database in step 4 is created + owned by the role all is fine. | |||||||||||
Steps To Reproduce | run create.database with user+database name used first ever. Observe SQLExceptions shown during: - clean.database.* - *.structure with * being either POSTGRE or ORACLE: Example error output: a.) postgres clean.database.POSTGRE: [sql] Executing commands [sql] 1 of 1 SQL statements executed successfully [sql] Executing commands [sql] Failed to execute: DROP ROLE tadpi [sql] org.postgresql.util.PSQLException: ERROR: role "tadpi" does not exist [sql] 0 of 1 SQL statements executed successfully b.) oracle clean.database.ORACLE: [sql] Executing commands [sql] Failed to execute: DROP USER tadpiora CASCADE [sql] java.sql.SQLSyntaxErrorException: ORA-01918: user 'TADPIORA' does not exist [sql] 0 of 1 SQL statements executed successfully | |||||||||||
Proposed Solution | Avoid the exception by using 'not exists' form of drop commands which does not error out if the db object does not exist. | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | 32514.patch (2,434) 2017-07-27 12:39 https://issues.openbravo.com/file_download.php?file_id=10936&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2017-06-12 13:17 | shuehner | New Issue | ||||||||||
2017-06-12 13:17 | shuehner | Assigned To | => platform | |||||||||
2017-06-12 13:17 | shuehner | Modules | => Core | |||||||||
2017-06-12 13:17 | shuehner | Triggers an Emergency Pack | => No | |||||||||
2017-06-12 13:33 | shuehner | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=15324#r15324 | |||||||||
2017-06-16 11:26 | alostale | Relationship added | blocks 0036162 | |||||||||
2017-06-16 11:26 | alostale | Status | new => acknowledged | |||||||||
2017-06-28 07:30 | hgbot | Checkin | ||||||||||
2017-06-28 07:30 | hgbot | Note Added: 0097728 | ||||||||||
2017-06-28 07:30 | hgbot | Status | acknowledged => resolved | |||||||||
2017-06-28 07:30 | hgbot | Resolution | open => fixed | |||||||||
2017-06-28 07:30 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d39f80176463d1f9beeec3720e9d980121265d97 [^] | |||||||||
2017-06-28 13:48 | asiermartirena | Status | resolved => new | |||||||||
2017-06-28 13:48 | asiermartirena | Resolution | fixed => open | |||||||||
2017-06-28 13:48 | asiermartirena | Status | new => acknowledged | |||||||||
2017-06-28 13:49 | asiermartirena | Note Added: 0097738 | ||||||||||
2017-06-28 18:24 | asiermartirena | Note Edited: 0097738 | bug_revision_view_page.php?bugnote_id=0097738#r15438 | |||||||||
2017-07-27 12:39 | staffrm | File Added: 32514.patch | ||||||||||
2018-02-14 10:19 | alostale | Priority | normal => urgent | |||||||||
2018-02-14 10:38 | AugustoMauch | Note Deleted: 0097728 | ||||||||||
2018-02-14 10:38 | AugustoMauch | Note Deleted: 0097738 | ||||||||||
2018-02-14 12:00 | AugustoMauch | Description Updated | bug_revision_view_page.php?rev_id=16686#r16686 | |||||||||
2018-02-14 13:36 | AugustoMauch | Review Assigned To | => caristu | |||||||||
2018-02-14 13:37 | hgbot | Checkin | ||||||||||
2018-02-14 13:37 | hgbot | Note Added: 0102400 | ||||||||||
2018-02-14 13:37 | hgbot | Status | acknowledged => resolved | |||||||||
2018-02-14 13:37 | hgbot | Resolution | open => fixed | |||||||||
2018-02-14 13:37 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d39f80176463d1f9beeec3720e9d980121265d97 [^] => http://code.openbravo.com/erp/devel/pi/rev/15559dddfaad50d6fe3ff863ee8df2a362f7fc02 [^] | |||||||||
2018-02-22 18:19 | hudsonbot | Checkin | ||||||||||
2018-02-22 18:19 | hudsonbot | Note Added: 0102758 | ||||||||||
2018-02-28 16:23 | caristu | Assigned To | platform => AugustoMauch | |||||||||
2018-03-13 10:29 | hgbot | Checkin | ||||||||||
2018-03-13 10:29 | hgbot | Note Added: 0103181 | ||||||||||
2018-03-13 10:59 | caristu | Note Added: 0103182 | ||||||||||
2018-03-13 10:59 | caristu | Status | resolved => closed | |||||||||
2018-03-13 10:59 | caristu | Fixed in Version | => 3.0PR18Q2 | |||||||||
2018-03-14 04:59 | hudsonbot | Checkin | ||||||||||
2018-03-14 04:59 | hudsonbot | Note Added: 0103221 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|