trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: TRAFODION-1856: Revoke - object ...
Date Tue, 01 Mar 2016 20:01:33 GMT
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/349#discussion_r54626149
  
    --- Diff: core/sql/sqlcomp/PrivMgrMD.cpp ---
    @@ -962,29 +979,41 @@ PrivStatus PrivMgrMDAdmin::getReferencingTablesForConstraints (
         trafMetadataLocation_ + ".OBJECTS o";
       std::string tblConstraintsMDTable = 
         trafMetadataLocation_ + ".TABLE_CONSTRAINTS t";
    +  std::string keysMDTable = 
    +    trafMetadataLocation_ + ".KEYS k";
       std::string uniqueRefConstraintsMDTable = 
         trafMetadataLocation_ + ".UNIQUE_REF_CONSTR_USAGE u";
     
       // Select all the constraints that are referenced by the table
    -  // create_time is included to order by the oldest to newest
       std::string selectStmt = "select distinct o.object_uid, o.object_owner, o.object_type,
o.create_time, ";
       selectStmt += "trim(o.catalog_name) || '.\"' || ";
    -  selectStmt += "trim (o.schema_name) || '\".\"' ||";
    -  selectStmt += "trim (o.object_name)|| '\"' from ";
    +  selectStmt +=   "trim (o.schema_name) || '\".\"' ||";
    +  selectStmt +=   "trim (o.object_name)|| '\"' ";
    +  selectStmt += ", c.column_number "; 
    +  selectStmt += "from " + uniqueRefConstraintsMDTable + std::string(", ");
    --- End diff --
    
    Why is that ","  should be std::string?  I wonder if std::string will trigger memory allocation
in the malloc heap space


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message