Github user robertamarton commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/957#discussion_r101307451
  
    --- Diff: core/sql/common/ComUser.cpp ---
    @@ -348,6 +348,33 @@ Int16 ComUser::getAuthNameFromAuthID(Int32   authID,
       return FEOK;
     }
     
    +
    +// 
----------------------------------------------------------------------------
    +// method: currentUserHasRole
    +//
    +// Searches the list of roles stored for the user to see if passed in role 
ID
    +// is found
    +//
    +//  Returns:  true - role found
    +//            false - role not found
    +// 
----------------------------------------------------------------------------
    +bool ComUser::currentUserHasRole(Int32 roleID)
    +{
    +  Int32 numRoles = 0;
    +  Int32 *roleIDs = 0;
    +  if (SQL_EXEC_GetRoleList(numRoles, roleIDs) < 0)
    --- End diff --
    
    It is the latter.  The cli allocates space from its heap.  It is 
implemented similar to other CLI requests,  if memory is required, it is 
allocated from the heap.  The destructor removes it.    


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to