trafodion-codereview mailing list archives

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

    https://github.com/apache/incubator-trafodion/pull/349#discussion_r54640198
  
    --- 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 --
    
    The "+" operator for the c++ string class does not allow char * to be appended. (At least
I have been able to do so), but if it is converted to a string first, it works.  As far as
how the malloc heap is used, probably depends on how the compiler generates the code. 


---
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