From: Tom Lane Date: Thu, 4 Jan 2001 02:36:52 +0000 (+0000) Subject: Repair guaranteed core dump in SPI_exec(). Guess this routine wasn't X-Git-Tag: REL7_1_BETA2~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9d6ffc5c409f805886d3df721f606216ff7ec53;p=postgresql Repair guaranteed core dump in SPI_exec(). Guess this routine wasn't used before ... --- diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index b309dc5022..f07c0fcdba 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -3,7 +3,7 @@ * spi.c * Server Programming Interface * - * $Id: spi.c,v 1.50 2000/12/01 22:10:30 tgl Exp $ + * $Id: spi.c,v 1.51 2001/01/04 02:36:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -695,8 +695,11 @@ _SPI_execute(char *src, int tcount, _SPI_plan *plan) } } - plan->qtlist = queryTree_list; - plan->ptlist = planTree_list; + if (plan) + { + plan->qtlist = queryTree_list; + plan->ptlist = planTree_list; + } return res; }