New ecgp code problem.
От | Keith Parks |
---|---|
Тема | New ecgp code problem. |
Дата | |
Msg-id | 199802172208.WAA06148@mtcc.demon.co.uk обсуждение исходный текст |
Ответы |
Re: New ecgp code problem.
|
Список | pgsql-hackers |
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;
В списке pgsql-hackers по дате отправления: