Thread
-
New ecgp code problem.
Keith Parks <emkxp01@mtcc.demon.co.uk> — 1998-02-17T22:08:28Z
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; -
Re: New ecgp code problem.
Michael Meskes <meskes@topsystem.de> — 1998-02-18T08:15:05Z
Keith Parks writes: > If I apply the following patch all is OK. Thanks. It's already in CVS it seems. Are you able to execute programs against v6.3? I cannot even create a user so I only can test my changes my manually inspecting the C file right now. Michael -- Dr. Michael Meskes, Project-Manager | topsystem Systemhaus GmbH meskes@topsystem.de | Europark A2, Adenauerstr. 20 meskes@debian.org | 52146 Wuerselen Go SF49ers! Go Rhein Fire! | Tel: (+49) 2405/4670-44 Use Debian GNU/Linux! | Fax: (+49) 2405/4670-10