mirror of https://github.com/citusdata/citus.git
multi_router_planner: Remove NULL check which would've segfaulted earlier
parent
1b0776f98e
commit
25f86bca3f
|
@ -778,32 +778,14 @@ ModifyQuerySupported(Query *queryTree, Query *originalQuery, bool multiShardQuer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
if (commandType != CMD_INSERT && multiShardQuery)
|
||||||
* We have to allow modify queries with two range table entries, if it is pushdownable.
|
|
||||||
*/
|
|
||||||
if (commandType != CMD_INSERT)
|
|
||||||
{
|
{
|
||||||
/* We can not get restriction context via master_modify_multiple_shards path */
|
DeferredErrorMessage *errorMessage = MultiShardModifyQuerySupported(
|
||||||
if (plannerRestrictionContext == NULL)
|
originalQuery, plannerRestrictionContext);
|
||||||
{
|
|
||||||
if (queryTableCount != 1)
|
|
||||||
{
|
|
||||||
return DeferredError(ERRCODE_FEATURE_NOT_SUPPORTED,
|
|
||||||
"cannot run multi shard modify query with master_modify_multiple_shards when the query involves subquery or join",
|
|
||||||
"Execute the query without using master_modify_multiple_shards()",
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* If it is a multi-shard modify query with multiple tables */
|
|
||||||
else if (multiShardQuery)
|
|
||||||
{
|
|
||||||
DeferredErrorMessage *errorMessage = MultiShardModifyQuerySupported(
|
|
||||||
originalQuery, plannerRestrictionContext);
|
|
||||||
|
|
||||||
if (errorMessage != NULL)
|
if (errorMessage != NULL)
|
||||||
{
|
{
|
||||||
return errorMessage;
|
return errorMessage;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue