mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Revert "Cope with NULL query string in ExecInitParallelPlan()."
This reverts commit b3ee4c5038
.
We don't need it in the wake of the preceding commit, which
added an upstream check that the querystring isn't null.
Discussion: https://postgr.es/m/2197698.1617984583@sss.pgh.pa.us
This commit is contained in:
@@ -647,7 +647,7 @@ ExecInitParallelPlan(PlanState *planstate, EState *estate,
|
|||||||
shm_toc_estimate_keys(&pcxt->estimator, 1);
|
shm_toc_estimate_keys(&pcxt->estimator, 1);
|
||||||
|
|
||||||
/* Estimate space for query text. */
|
/* Estimate space for query text. */
|
||||||
query_len = estate->es_sourceText ? strlen(estate->es_sourceText) : 0;
|
query_len = strlen(estate->es_sourceText);
|
||||||
shm_toc_estimate_chunk(&pcxt->estimator, query_len + 1);
|
shm_toc_estimate_chunk(&pcxt->estimator, query_len + 1);
|
||||||
shm_toc_estimate_keys(&pcxt->estimator, 1);
|
shm_toc_estimate_keys(&pcxt->estimator, 1);
|
||||||
|
|
||||||
@@ -742,10 +742,7 @@ ExecInitParallelPlan(PlanState *planstate, EState *estate,
|
|||||||
|
|
||||||
/* Store query string */
|
/* Store query string */
|
||||||
query_string = shm_toc_allocate(pcxt->toc, query_len + 1);
|
query_string = shm_toc_allocate(pcxt->toc, query_len + 1);
|
||||||
if (query_len == 0)
|
memcpy(query_string, estate->es_sourceText, query_len + 1);
|
||||||
query_string[0] = 0;
|
|
||||||
else
|
|
||||||
memcpy(query_string, estate->es_sourceText, query_len + 1);
|
|
||||||
shm_toc_insert(pcxt->toc, PARALLEL_KEY_QUERY_TEXT, query_string);
|
shm_toc_insert(pcxt->toc, PARALLEL_KEY_QUERY_TEXT, query_string);
|
||||||
|
|
||||||
/* Store serialized PlannedStmt. */
|
/* Store serialized PlannedStmt. */
|
||||||
|
Reference in New Issue
Block a user