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.pull/3600/head
parent
468319e638
commit
e0bbe1ca38
|
@ -880,7 +880,11 @@ ErrorIfUnsupportedConstraint(Relation relation, char distributionMethod,
|
|||
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);
|
||||
List *indexOidList = RelationGetIndexList(relation);
|
||||
|
|
Loading…
Reference in New Issue