Added missing ECPGget_sqlca() call

This commit is contained in:
Michael Meskes 2006-07-31 13:26:46 +00:00
parent c1c9b7c0c0
commit 4cd72b53b9

View File

@ -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);