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 #660: TRAFODION [2137] Improve metadata acc...
Date Thu, 18 Aug 2016 17:23:13 GMT
Github user robertamarton commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/660#discussion_r75350522
  
    --- Diff: core/sql/sqlcat/TrafDDLdesc.h ---
    @@ -1105,6 +1129,114 @@ class TrafViewDesc : public TrafDesc {
       char filler[22];
     };
     
    +// --------------------------- privilege descriptors ---------------------------
    +// The privilege descriptors are organized as follows:
    +//   privDesc - a TrafPrivDesc containing the privGrantees
    +//   privGrantees - a TrafPrivGranteeDesc descriptor containing:
    +//     grantee - int32 value for each user granted a privilege directly or
    +//               through a role granted to the user
    +//     objectBitmap  - a TrafPrivBitmapDesc containing granted object privs
    +//                     summarized across all grantors
    +//     columnBitmaps - list of TrafPrivBitmapDesc, one per colummn, containing 
    +//                     granted column privs, summarized across all grantors
    +//   priv_bits desc - a TrafPrivBitmapDesc descriptor containing:
    +//     privBitmap - bitmap containing granted privs such as SELECT
    +//     privWGO - bitmap containing WGO for associated grant (privBitmap)
    +//     columnOrdinal - column number for bitmap, for objects, column
    +//                     number is not relavent so it is set to -1.
    +//   column bits - list of TrafPrivBitmapDesc
    +class TrafPrivDesc : public TrafDesc {
    +public:
    +  TrafPrivDesc() : TrafDesc(DESC_PRIV_TYPE)
    +  {}
    +
    +  // ---------------------------------------------------------------------
    +  // Redefine virtual functions required for Versioning.
    +  //----------------------------------------------------------------------
    +  virtual unsigned char getClassVersionID()
    +  {
    +    return 1;
    +  }
    +
    +  virtual void populateImageVersionIDArray()
    +  {
    +    setImageVersionID(0,getClassVersionID());
    +  }
    +
    +  virtual short getClassSize()      { return (short)sizeof(TrafPrivDesc); }
    +
    +  virtual Long pack(void *space);
    --- End diff --
    
    pack returns a pointer - 8 bytes, unpack returns the status - 4 bytes.


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