Hi All,
I'm getting a SEGV error when testing ecpg using the perftest,or
any other, example program.
I have tracked this down to a call to PQfinish() in ECPGfinish()
that occurs before any connection is established.
bool
ECPGfinish()
{
if (simple_connection != NULL)
{
ECPGlog("ECPGfinish: finishing.\n");
PQfinish(simple_connection);
}
else
ECPGlog("ECPGfinish: called an extra time.\n");
return true;
}
A test is made here for simple_connection != NULL.
If I apply the following patch all is OK.
Keith.
*** src/interfaces/ecpg/lib/ecpglib.c.orig Tue Feb 17 22:01:00 1998
--- src/interfaces/ecpg/lib/ecpglib.c Tue Feb 17 22:01:30 1998
***************
*** 24,30 ****
#include <libpq-fe.h>
#include <libpq/pqcomm.h>
! static PGconn *simple_connection;
static int simple_debug = 0;
static FILE *debugstream = NULL;
static int committed = true;
--- 24,30 ----
#include <libpq-fe.h>
#include <libpq/pqcomm.h>
! static PGconn *simple_connection = NULL;
static int simple_debug = 0;
static FILE *debugstream = NULL;
static int committed = true;