mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
From: Michael Meskes <Michael_Meskes@topmail.de>
+ + Fri Feb 19 21:40:14 CET 1999 + + - Fixed bug in libecpg that caused it to start transactions only for + the first connection. + - Set library version to 2.7.1
This commit is contained in:
parent
23c30246d7
commit
ae4a40dc26
@ -457,3 +457,9 @@ Fri Feb 19 18:38:45 CET 1999
|
|||||||
|
|
||||||
- Finished type aliasing for structures.
|
- Finished type aliasing for structures.
|
||||||
- Set ecpg version to 2.5.0
|
- Set ecpg version to 2.5.0
|
||||||
|
|
||||||
|
Fri Feb 19 21:40:14 CET 1999
|
||||||
|
|
||||||
|
- Fixed bug in libecpg that caused it to start transactions only for
|
||||||
|
the first connection.
|
||||||
|
- Set library version to 2.7.1
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
# Copyright (c) 1994, Regents of the University of California
|
# Copyright (c) 1994, Regents of the University of California
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.41 1999/02/20 07:00:53 scrappy Exp $
|
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.42 1999/02/21 03:02:35 scrappy Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
NAME= ecpg
|
NAME= ecpg
|
||||||
SO_MAJOR_VERSION= 2
|
SO_MAJOR_VERSION= 2
|
||||||
SO_MINOR_VERSION= 7.0
|
SO_MINOR_VERSION= 7.1
|
||||||
|
|
||||||
SRCDIR= @top_srcdir@
|
SRCDIR= @top_srcdir@
|
||||||
include $(SRCDIR)/Makefile.global
|
include $(SRCDIR)/Makefile.global
|
||||||
|
@ -55,6 +55,7 @@ static struct connection
|
|||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
PGconn *connection;
|
PGconn *connection;
|
||||||
|
int committed;
|
||||||
struct connection *next;
|
struct connection *next;
|
||||||
} *all_connections = NULL, *actual_connection = NULL;
|
} *all_connections = NULL, *actual_connection = NULL;
|
||||||
|
|
||||||
@ -90,7 +91,6 @@ struct prepared_statement
|
|||||||
|
|
||||||
static int simple_debug = 0;
|
static int simple_debug = 0;
|
||||||
static FILE *debugstream = NULL;
|
static FILE *debugstream = NULL;
|
||||||
static int committed = true;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
register_error(long code, char *fmt,...)
|
register_error(long code, char *fmt,...)
|
||||||
@ -564,7 +564,7 @@ ECPGexecute(struct statement * stmt)
|
|||||||
|
|
||||||
/* Now the request is built. */
|
/* Now the request is built. */
|
||||||
|
|
||||||
if (committed && !no_auto_trans)
|
if (actual_connection->committed && !no_auto_trans)
|
||||||
{
|
{
|
||||||
if ((results = PQexec(actual_connection->connection, "begin transaction")) == NULL)
|
if ((results = PQexec(actual_connection->connection, "begin transaction")) == NULL)
|
||||||
{
|
{
|
||||||
@ -572,7 +572,7 @@ ECPGexecute(struct statement * stmt)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
PQclear(results);
|
PQclear(results);
|
||||||
committed = 0;
|
actual_connection->committed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ECPGlog("ECPGexecute line %d: QUERY: %s\n", stmt->lineno, copiedquery);
|
ECPGlog("ECPGexecute line %d: QUERY: %s\n", stmt->lineno, copiedquery);
|
||||||
@ -987,7 +987,7 @@ ECPGtrans(int lineno, const char *transaction)
|
|||||||
{
|
{
|
||||||
struct prepared_statement *this;
|
struct prepared_statement *this;
|
||||||
|
|
||||||
committed = 1;
|
actual_connection->committed = true;
|
||||||
|
|
||||||
/* deallocate all prepared statements */
|
/* deallocate all prepared statements */
|
||||||
for (this = prep_stmts; this != NULL; this = this->next)
|
for (this = prep_stmts; this != NULL; this = this->next)
|
||||||
@ -999,7 +999,7 @@ ECPGtrans(int lineno, const char *transaction)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -1060,6 +1060,8 @@ ECPGconnect(int lineno, const char *dbname, const char *user, const char *passwd
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->committed = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user