Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae4a40d

Browse files
committed
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
1 parent23c3024 commitae4a40d

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,3 +457,9 @@ Fri Feb 19 18:38:45 CET 1999
457457

458458
- Finished type aliasing for structures.
459459
- Set ecpg version to 2.5.0
460+
461+
Fri Feb 19 21:40:14 CET 1999
462+
463+
- Fixed bug in libecpg that caused it to start transactions only for
464+
the first connection.
465+
- Set library version to 2.7.1

‎src/interfaces/ecpg/lib/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
# Copyright (c) 1994, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.41 1999/02/20 07:00:53 scrappy Exp $
9+
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.42 1999/02/21 03:02:35 scrappy Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

1313
NAME= ecpg
1414
SO_MAJOR_VERSION= 2
15-
SO_MINOR_VERSION= 7.0
15+
SO_MINOR_VERSION= 7.1
1616

1717
SRCDIR= @top_srcdir@
1818
include$(SRCDIR)/Makefile.global

‎src/interfaces/ecpg/lib/ecpglib.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ struct sqlca sqlca =
5353

5454
staticstructconnection
5555
{
56-
char*name;
57-
PGconn*connection;
56+
char*name;
57+
PGconn*connection;
58+
intcommitted;
5859
structconnection*next;
59-
}*all_connections=NULL,*actual_connection=NULL;
60+
}*all_connections=NULL,*actual_connection=NULL;
6061

6162
structvariable
6263
{
@@ -90,7 +91,6 @@ struct prepared_statement
9091

9192
staticintsimple_debug=0;
9293
staticFILE*debugstream=NULL;
93-
staticintcommitted= true;
9494

9595
staticvoid
9696
register_error(longcode,char*fmt,...)
@@ -564,15 +564,15 @@ ECPGexecute(struct statement * stmt)
564564

565565
/* Now the request is built. */
566566

567-
if (committed&& !no_auto_trans)
567+
if (actual_connection->committed&& !no_auto_trans)
568568
{
569569
if ((results=PQexec(actual_connection->connection,"begin transaction"))==NULL)
570570
{
571571
register_error(ECPG_TRANS,"Error starting transaction line %d.",stmt->lineno);
572572
return false;
573573
}
574574
PQclear(results);
575-
committed=0;
575+
actual_connection->committed=false;
576576
}
577577

578578
ECPGlog("ECPGexecute line %d: QUERY: %s\n",stmt->lineno,copiedquery);
@@ -987,7 +987,7 @@ ECPGtrans(int lineno, const char *transaction)
987987
{
988988
structprepared_statement*this;
989989

990-
committed=1;
990+
actual_connection->committed=true;
991991

992992
/* deallocate all prepared statements */
993993
for (this=prep_stmts;this!=NULL;this=this->next)
@@ -999,7 +999,7 @@ ECPGtrans(int lineno, const char *transaction)
999999
}
10001000
}
10011001

1002-
returnTRUE;
1002+
returntrue;
10031003
}
10041004

10051005
bool
@@ -1059,6 +1059,8 @@ ECPGconnect(int lineno, const char *dbname, const char *user, const char *passwd
10591059
register_error(ECPG_CONNECT,"connect: could not open database %s.",dbname ?dbname :"NULL");
10601060
return false;
10611061
}
1062+
1063+
this->committed= true;
10621064

10631065
return true;
10641066
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp