Github user robertamarton commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1723#discussion_r227473824
--- Diff: core/sql/executor/ExExeUtilGet.cpp ---
@@ -1665,10 +1665,10 @@ NABoolean
ExExeUtilGetMetadataInfoTcb::checkUserPrivs(
if (ComUser::isRootUserID())
return FALSE;
- // any user granted the DB__ROOTROLE sees everything
Int32 numRoles;
Int32 *roleList;
- if (currContext->getRoleList(numRoles, roleList) == SUCCESS)
+ Int32 *granteeList;
--- End diff --
The roleList and granteeList members are allocated on the exHeap and stored
in context cache. When context is initialized, these list values are set to
NULL. The first time they are referenced, metadata is read to get details for
the current user. They are updated when privileges change through QI. They
are also updated when a new user connects to Trafodion. The heap is destroyed
when the context class is destructed.
---