stupid subselect core dumps

Started by Thomas G. Lockhartalmost 28 years ago2 messages
#1Thomas G. Lockhart
lockhart@alumni.caltech.edu

I know this is too simple to be useful, but it was the first test case I
tried for a regression test :)

regression=> SELECT 1 AS one WHERE 1 IN (SELECT 1);
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
This probably means the backend terminated abnormally before or
while processing the request.

Should we disallow parts of this in or near the parser, or can the
backend possibly handle it?

- Tom

#2Vadim B. Mikheev
vadim@sable.krasnoyarsk.su
In reply to: Thomas G. Lockhart (#1)
1 attachment(s)
Re: stupid subselect core dumps

Thomas G. Lockhart wrote:

I know this is too simple to be useful, but it was the first test case I
tried for a regression test :)

regression=> SELECT 1 AS one WHERE 1 IN (SELECT 1);
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
This probably means the backend terminated abnormally before or
while processing the request.

Should we disallow parts of this in or near the parser, or can the
backend possibly handle it?

Fixed. Patch for nodeResult.c follows.

Vadim

Attachments:

DFapplication/octet-stream; name=DFDownload
*** nodeResult.c.orig	Wed Feb 18 13:19:47 1998
--- nodeResult.c	Wed Feb 18 13:20:31 1998
***************
*** 291,297 ****
  	 * if chgParam of subnode is not null then plan
  	 * will be re-scanned by first ExecProcNode.
  	 */
! 	if (((Plan*) node)->lefttree->chgParam == NULL)
  		ExecReScan (((Plan*) node)->lefttree, exprCtxt, (Plan *) node);
  	
  }
--- 291,298 ----
  	 * if chgParam of subnode is not null then plan
  	 * will be re-scanned by first ExecProcNode.
  	 */
! 	if (((Plan*) node)->lefttree && 
! 			((Plan*) node)->lefttree->chgParam == NULL)
  		ExecReScan (((Plan*) node)->lefttree, exprCtxt, (Plan *) node);
  	
  }