forked from huawei/openGauss-server
update src/common/backend/utils/init/miscinit.cpp.
This commit is contained in:
parent
e929c3d736
commit
8b911a9ecc
|
|
@ -802,8 +802,7 @@ void InitializeSessionUserId(const char* rolename)
|
|||
char userName[NAMEDATALEN];
|
||||
MemoryContext oldcontext = NULL;
|
||||
oldcontext = MemoryContextSwitchTo(SESS_GET_MEM_CXT_GROUP(MEMORY_CONTEXT_EXECUTOR));
|
||||
if (u_sess->proc_cxt.MyProcPort->user_name)
|
||||
pfree_ext(u_sess->proc_cxt.MyProcPort->user_name);
|
||||
pfree_ext(u_sess->proc_cxt.MyProcPort->user_name);
|
||||
u_sess->proc_cxt.MyProcPort->user_name = pstrdup((char*)GetSuperUserName((char*)userName));
|
||||
(void)MemoryContextSwitchTo(oldcontext);
|
||||
rolename = u_sess->proc_cxt.MyProcPort->user_name;
|
||||
|
|
|
|||
Loading…
Reference in New Issue