mirror of https://github.com/citusdata/citus.git
Merge pull request #717 from citusdata/fix-700
Skip over unreferenced parameters when router executing prepared statement.pull/729/head
commit
3ea352e5f9
|
@ -821,7 +821,12 @@ ExtractParametersFromParamListInfo(ParamListInfo paramListInfo, Oid **parameterT
|
||||||
(*parameterTypes)[parameterIndex] = parameterData->ptype;
|
(*parameterTypes)[parameterIndex] = parameterData->ptype;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parameterData->isnull)
|
/*
|
||||||
|
* If the parameter is NULL, or is not referenced / used (ptype == 0
|
||||||
|
* would otherwise have errored out inside standard_planner()),
|
||||||
|
* don't pass a value to the remote side.
|
||||||
|
*/
|
||||||
|
if (parameterData->isnull || parameterData->ptype == 0)
|
||||||
{
|
{
|
||||||
(*parameterValues)[parameterIndex] = NULL;
|
(*parameterValues)[parameterIndex] = NULL;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue