mirror of https://github.com/citusdata/citus.git
multi_router_planner: Remove NULL check which would've segfaulted earlier
parent
1b0776f98e
commit
25f86bca3f
|
@ -778,24 +778,7 @@ ModifyQuerySupported(Query *queryTree, Query *originalQuery, bool multiShardQuer
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 */
|
||||
if (plannerRestrictionContext == NULL)
|
||||
{
|
||||
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)
|
||||
if (commandType != CMD_INSERT && multiShardQuery)
|
||||
{
|
||||
DeferredErrorMessage *errorMessage = MultiShardModifyQuerySupported(
|
||||
originalQuery, plannerRestrictionContext);
|
||||
|
@ -805,7 +788,6 @@ ModifyQuerySupported(Query *queryTree, Query *originalQuery, bool multiShardQuer
|
|||
return errorMessage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (commandType == CMD_INSERT || commandType == CMD_UPDATE ||
|
||||
commandType == CMD_DELETE)
|
||||
|
|
Loading…
Reference in New Issue