!4964 issue修改:解决create tablespace赋予权限与mysql不一致的问题

Merge pull request !4964 from 李居隆/master
This commit is contained in:
opengauss_bot
2024-03-15 07:21:22 +00:00
committed by Gitee

View File

@ -898,7 +898,8 @@ void DropTableSpace(DropTableSpaceStmt* stmt)
tablespaceoid = HeapTupleGetOid(tuple);
/* Must be tablespace owner or have drop privileges of the target object. */
AclResult aclresult = pg_tablespace_aclcheck(tablespaceoid, GetUserId(), ACL_DROP);
if (aclresult != ACLCHECK_OK && !pg_tablespace_ownercheck(tablespaceoid, GetUserId())) {
if (aclresult != ACLCHECK_OK && !pg_tablespace_ownercheck(tablespaceoid, GetUserId())
&& (!is_member_of_role(GetUserId(), DEFAULT_ROLE_TABLESPACE) || !DB_IS_CMPT(B_FORMAT))) {
aclcheck_error(ACLCHECK_NO_PRIV, ACL_KIND_TABLESPACE, tablespacename);
}