From 4cd72b53b9975bab5f4ca0792cf4f54c84829404 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Mon, 31 Jul 2006 13:26:46 +0000 Subject: [PATCH] Added missing ECPGget_sqlca() call --- src/interfaces/ecpg/ecpglib/misc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index ef46496e75..4cd8f27150 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.28 2006/07/31 10:15:30 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.29 2006/07/31 13:26:46 meskes Exp $ */ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" @@ -239,6 +239,7 @@ void ECPGlog(const char *format,...) { va_list ap; + struct sqlca_t *sqlca = ECPGget_sqlca(); #ifdef ENABLE_THREAD_SAFETY pthread_mutex_lock(&debug_mutex); @@ -273,7 +274,7 @@ ECPGlog(const char *format,...) /* dump out internal sqlca variables */ if (getenv("ECPG_DONT_LOG_PID")) fprintf(debugstream, "[NO_PID]: sqlca: code: %ld, state: %s\n", - sqlca.sqlcode, sqlca.sqlstate); + sqlca->sqlcode, sqlca->sqlstate); fflush(debugstream);