!1346 代码瑕疵存在隐患

Merge pull request !1346 from wangym11/I4GJWP
This commit is contained in:
opengauss-bot
2022-01-07 07:59:51 +00:00
committed by Gitee

View File

@ -689,7 +689,7 @@ Oid *namespaceid, bool isFirstNode)
#else
if (!IsA(stmt, CreateForeignTableStmt) && !stmt->distributeby && !stmt->inhRelations && cxt.fallback_dist_col) {
#endif
stmt->distributeby = (DistributeBy*)palloc0(sizeof(DistributeBy));
stmt->distributeby = makeNode(DistributeBy);
stmt->distributeby->disttype = DISTTYPE_HASH;
stmt->distributeby->colname = cxt.fallback_dist_col;
}