提交 d515365a 编写于 作者: T Tom Lane

Don't bother copying empty support arrays in a zero-column MergeJoin.

The case could not arise when this code was originally written, but it can
now (since we made zero-column MergeJoins work for the benefit of FULL JOIN
ON TRUE).  I don't think there is any actual bug here, but we might as well
treat it consistently with other uses of COPY_POINTER_FIELD().  Per comment
from Ashutosh Bapat.
上级 e969f9a7
......@@ -672,10 +672,13 @@ _copyMergeJoin(const MergeJoin *from)
*/
COPY_NODE_FIELD(mergeclauses);
numCols = list_length(from->mergeclauses);
COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid));
COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid));
COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int));
COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool));
if (numCols > 0)
{
COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid));
COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid));
COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int));
COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool));
}
return newnode;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册