trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertamarton <>
Subject [GitHub] incubator-trafodion pull request: Support for features described i...
Date Tue, 08 Sep 2015 18:27:43 GMT
Github user robertamarton commented on a diff in the pull request:
    --- Diff: core/sql/parser/StmtDDLDrop.cpp ---
    @@ -561,7 +561,8 @@ StmtDDLDropSchema::StmtDDLDropSchema(//const SchemaName & schemaName,
       // If the schema name specified is reserved name, users cannot drop them.
       // They can only be dropped internally.
       if ((! Get_SqlParser_Flags(INTERNAL_QUERY_FROM_EXEUTIL)) &&
    -      (ComIsTrafodionReservedSchemaName(schemaQualName_.getSchemaName())))
    +      (ComIsTrafodionReservedSchemaName(schemaQualName_.getSchemaName())) &&
    +      (!ComIsTrafodionExternalSchemaName(schemaQualName_.getSchemaName())))
    --- End diff --
    Sorry, I should have written this cleaner.  
    The first check - if the parserflag is set, then continue and don't return an error.
    The second check - if the schema name does not begin with an underscore, then continue
and don't return an error.
    The final check - if the schema name is not an external name, that is begins with "_HV_"
or "_HB_", then this is an error.  We don't want to drop tables beginning with the "_".
    I added this check so people who have the privilege can drop externally generated schemas.
 If this check did not exist, then you have to be DB__ROOT to remove these schemas.  I thought
this was a little extreme.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message