提交 3416a948 编写于 作者: D Dhanashree Kashid and Jesse Zhang 提交者: Dhanashree Kashid

Revert "Avoid null pointer deref in partition selection"

Commit 7b6dc9bf was well-intentioned,
but wrong: in cases where `outerPlan` is NULL, inputSlot should be
`NULL`, but the execution of the partition selector should *NOT*
prematurely end there, instead, a static partition selection should
happen (once) before this operator was exhausted (returning NULL).

This is a pure revert commit. The `NULL` initialization will follow.

This reverts commit 7b6dc9bf.
上级 f3980f36
......@@ -146,7 +146,7 @@ ExecPartitionSelector(PartitionSelectorState *node)
PartitionSelector *ps = (PartitionSelector *) node->ps.plan;
EState *estate = node->ps.state;
ExprContext *econtext = node->ps.ps_ExprContext;
TupleTableSlot *inputSlot = NULL;
TupleTableSlot *inputSlot;
TupleTableSlot *candidateOutputSlot;
if (ps->staticSelection)
......@@ -181,12 +181,12 @@ ExecPartitionSelector(PartitionSelectorState *node)
PlanState *outerPlan = outerPlanState(node);
Assert(outerPlan);
inputSlot = ExecProcNode(outerPlan);
}
if (TupIsNull(inputSlot))
{
/* no more tuples from outerPlan */
return NULL;
if (TupIsNull(inputSlot))
{
/* no more tuples from outerPlan */
return NULL;
}
}
/* partition elimination with the given input tuple */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册