Project:
View Revisions: Issue #36226 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0036226: On first install.source don't show SQLException when 'drop role' tries to delete a role which does not exist | ||
Revision | 2018-02-14 12:00 by AugustoMauch | ||
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. |
||
Revision | 2018-02-14 10:19 by AugustoMauch | ||
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. 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. |
Copyright © 2000 - 2009 MantisBT Group |