summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/execute.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2006-08-02 13:43:23 +0000
committerMichael Meskes <meskes@postgresql.org>2006-08-02 13:43:23 +0000
commit1fa6be6f69dc7723f67c24480c06663fba585d15 (patch)
tree112f98b09f4b43f12b3a9074b689d324a8c09f3d /src/interfaces/ecpg/ecpglib/execute.c
parent97eefd699654cee4b5bb043ddd3c1936eb5cf48d (diff)
ynced parser and keyword list.
Implemented EXEC SQL UNDEF. Applied first version of the regression test patch by Joachim Wieland <joe@mcknight.de>.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/execute.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index e98646214d4..93f912b8915 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.55 2006/07/28 11:49:36 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.56 2006/08/02 13:43:23 meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
@@ -1465,7 +1465,7 @@ ECPGdo(int lineno, int compat, int force_indicator, const char *connection_name,
{
va_list args;
struct statement *stmt;
- struct connection *con = ECPGget_connection(connection_name);
+ struct connection *con;
bool status;
char *oldlocale;
@@ -1474,6 +1474,12 @@ ECPGdo(int lineno, int compat, int force_indicator, const char *connection_name,
oldlocale = ECPGstrdup(setlocale(LC_NUMERIC, NULL), lineno);
setlocale(LC_NUMERIC, "C");
+#ifdef ENABLE_THREAD_SAFETY
+ ecpg_pthreads_init();
+#endif
+
+ con = ECPGget_connection(connection_name);
+
if (!ECPGinit(con, connection_name, lineno))
{
setlocale(LC_NUMERIC, oldlocale);