bug in plancache.c

Поиск
Список
Период
Сортировка
От yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
Тема bug in plancache.c
Дата
Msg-id 20110926101548.8FA8A14A143@mail.netbsd.org
обсуждение исходный текст
Ответы Re: bug in plancache.c
Список pgsql-bugs
hi,

GetCachedPlan can pass the 'qlist' to the planner twice.
if i understand the code correctly, it's unsafe because the planner is
destructive wrt the input tree.  for my application, it often causes
a crash in executor.

YAMAMOTO Takashi

diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
index cfeb824..78c2c31 100644
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -949,6 +949,7 @@ GetCachedPlan(CachedPlanSource *plansource, ParamListInfo boundParams,
         {
             /* Build a new generic plan */
             plan = BuildCachedPlan(plansource, qlist, NULL);
+            qlist = NIL;
             /* Just make real sure plansource->gplan is clear */
             ReleaseGenericPlan(plansource);
             /* Link the new generic plan into the plansource */

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Dean Heller"
Дата:
Сообщение: BUG #6224: Installation Error of dotconnect for postgre SQL Professional
Следующее
От: Dave Page
Дата:
Сообщение: Re: BUG #6223: Installation with service account