Skip to content

Commit 2ab3a88

Browse files
author
Michael Meskes
committed
Accept subsequent commits. This should have been just a warning anyway. I
cannot see a reason why it should be an error.
1 parent 85bc361 commit 2ab3a88

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,5 +1207,9 @@ Sat Jan 12 22:04:02 CET 2002
12071207
- Fixed variable handling for struct members.
12081208
- Removed check for array input. An attribut might store the
12091209
complete array.
1210+
1211+
Fri Jan 18 16:49:02 CET 2002
1212+
1213+
- Accept subsequent commits.
12101214
- Set ecpg version to 2.9.0.
12111215
- Set library version to 3.3.0.

src/interfaces/ecpg/lib/misc.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/misc.c,v 1.11 2001/12/23 12:17:41 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/misc.c,v 1.12 2002/01/18 15:51:00 meskes Exp $ */
22

33
#include "postgres_fe.h"
44

@@ -90,12 +90,17 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
9090
/* if we have no connection we just simulate the command */
9191
if (con && con->connection)
9292
{
93-
if ((res = PQexec(con->connection, transaction)) == NULL)
93+
/* if we are not in autocommit mode, already have committed
94+
* the transaction and get another commit, just ignore it */
95+
if (!con->committed || con->autocommit)
9496
{
95-
ECPGraise(lineno, ECPG_TRANS, NULL);
96-
return FALSE;
97+
if ((res = PQexec(con->connection, transaction)) == NULL)
98+
{
99+
ECPGraise(lineno, ECPG_TRANS, NULL);
100+
return FALSE;
101+
}
102+
PQclear(res);
97103
}
98-
PQclear(res);
99104
}
100105

101106
if (strcmp(transaction, "commit") == 0 || strcmp(transaction, "rollback") == 0)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy