mirror of https://github.com/citusdata/citus.git
Remove VLA from UpdateNodeLocation
parent
a2ed45e206
commit
e6ebfc1f53
|
@ -501,11 +501,10 @@ static void
|
||||||
UpdateNodeLocation(int32 nodeId, char *newNodeName, int32 newNodePort)
|
UpdateNodeLocation(int32 nodeId, char *newNodeName, int32 newNodePort)
|
||||||
{
|
{
|
||||||
const bool indexOK = true;
|
const bool indexOK = true;
|
||||||
const int scanKeyCount = 1;
|
|
||||||
|
|
||||||
Relation pgDistNode = NULL;
|
Relation pgDistNode = NULL;
|
||||||
TupleDesc tupleDescriptor = NULL;
|
TupleDesc tupleDescriptor = NULL;
|
||||||
ScanKeyData scanKey[scanKeyCount];
|
ScanKeyData scanKey[1];
|
||||||
SysScanDesc scanDescriptor = NULL;
|
SysScanDesc scanDescriptor = NULL;
|
||||||
HeapTuple heapTuple = NULL;
|
HeapTuple heapTuple = NULL;
|
||||||
Datum values[Natts_pg_dist_node];
|
Datum values[Natts_pg_dist_node];
|
||||||
|
@ -519,7 +518,7 @@ UpdateNodeLocation(int32 nodeId, char *newNodeName, int32 newNodePort)
|
||||||
BTEqualStrategyNumber, F_INT4EQ, Int32GetDatum(nodeId));
|
BTEqualStrategyNumber, F_INT4EQ, Int32GetDatum(nodeId));
|
||||||
|
|
||||||
scanDescriptor = systable_beginscan(pgDistNode, DistNodeNodeIdIndexId(), indexOK,
|
scanDescriptor = systable_beginscan(pgDistNode, DistNodeNodeIdIndexId(), indexOK,
|
||||||
NULL, scanKeyCount, scanKey);
|
NULL, 1, scanKey);
|
||||||
|
|
||||||
heapTuple = systable_getnext(scanDescriptor);
|
heapTuple = systable_getnext(scanDescriptor);
|
||||||
if (!HeapTupleIsValid(heapTuple))
|
if (!HeapTupleIsValid(heapTuple))
|
||||||
|
|
Loading…
Reference in New Issue