Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 83efce7

Browse filesBrowse files
committed
Revert "Cope with NULL query string in ExecInitParallelPlan()."
This reverts commit b3ee4c5. 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
1 parent 1111b26 commit 83efce7
Copy full SHA for 83efce7

File tree

Expand file treeCollapse file tree

1 file changed

+2
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-5
lines changed

‎src/backend/executor/execParallel.c

Copy file name to clipboardExpand all lines: src/backend/executor/execParallel.c
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ ExecInitParallelPlan(PlanState *planstate, EState *estate,
647647
shm_toc_estimate_keys(&pcxt->estimator, 1);
648648

649649
/* Estimate space for query text. */
650-
query_len = estate->es_sourceText ? strlen(estate->es_sourceText) : 0;
650+
query_len = strlen(estate->es_sourceText);
651651
shm_toc_estimate_chunk(&pcxt->estimator, query_len + 1);
652652
shm_toc_estimate_keys(&pcxt->estimator, 1);
653653

@@ -742,10 +742,7 @@ ExecInitParallelPlan(PlanState *planstate, EState *estate,
742742

743743
/* Store query string */
744744
query_string = shm_toc_allocate(pcxt->toc, query_len + 1);
745-
if (query_len == 0)
746-
query_string[0] = 0;
747-
else
748-
memcpy(query_string, estate->es_sourceText, query_len + 1);
745+
memcpy(query_string, estate->es_sourceText, query_len + 1);
749746
shm_toc_insert(pcxt->toc, PARALLEL_KEY_QUERY_TEXT, query_string);
750747

751748
/* Store serialized PlannedStmt. */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.