Skip to content

Commit 8bf728f

Browse files
committed
Bugs fix.(Explain Analyze,..)prevent probable side effects
1 parent b28bba3 commit 8bf728f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PostgreSQL/src/backend/utils/misc/recathon.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4557,13 +4557,13 @@ copyQueryHelper(Query *query, Query *mainQuery)
45574557

45584558
ListCell * l;
45594559
ListCell *curr_old = mainQuery->rtable->head;
4560-
4560+
45614561
if(mainQuery->recommendStmt != NULL)
45624562
query->recommendStmt = (Node*)(mainQuery->recommendStmt);
45634563
if(list_length(query->rtable) >= 1){
45644564
forboth(l, query->rtable, curr_old, mainQuery->rtable){
4565-
if(((RangeTblEntry*)l)->recommender != NULL){
4566-
lfirst(l) = lfirst(curr_old);
4565+
if(((RangeTblEntry*)lfirst(l))->recommender != NULL){
4566+
((RangeTblEntry*)lfirst(l))->recommender = ((RangeTblEntry*)lfirst(curr_old))->recommender;
45674567
}
45684568
}
45694569
}

0 commit comments

Comments
 (0)