mirror of https://github.com/citusdata/citus.git
Semmle: Actively check one possible NULL deref case (#3560)
Calling ErrorIfUnsupportedConstraint was still giving errors on Semmle. This
makes sure that we check for NULL at runtime. This way we can safely ignore all
errors created by this function.
(cherry picked from commit e0bbe1ca38
)
pull/3647/head
parent
e4e0c65203
commit
20782c5ff5
|
@ -884,7 +884,11 @@ ErrorIfUnsupportedConstraint(Relation relation, char distributionMethod,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Assert(distributionColumn != NULL);
|
if (distributionColumn == NULL)
|
||||||
|
{
|
||||||
|
ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR),
|
||||||
|
errmsg("distribution column of distributed table is NULL")));
|
||||||
|
}
|
||||||
|
|
||||||
char *relationName = RelationGetRelationName(relation);
|
char *relationName = RelationGetRelationName(relation);
|
||||||
List *indexOidList = RelationGetIndexList(relation);
|
List *indexOidList = RelationGetIndexList(relation);
|
||||||
|
|
Loading…
Reference in New Issue