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

Commit713b65e

Browse files
committed
Setting MyProc->xid to current transaction' id in StartTransaction
and to InvalidTransactionId in CommitTransaction & AbortTransaction(it's for new TransactionIdIsInProgress func).
1 parent1db76d7 commit713b65e

File tree

1 file changed

+24
-2
lines changed
  • src/backend/access/transam

1 file changed

+24
-2
lines changed

‎src/backend/access/transam/xact.c

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.5 1996/11/10 02:59:16 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.6 1996/11/27 07:14:51 vadim Exp $
1111
*
1212
* NOTES
1313
*Transaction aborts can now occur two ways:
@@ -753,7 +753,15 @@ StartTransaction()
753753
* state to "in progress"
754754
* ----------------
755755
*/
756-
s->state=TRANS_INPROGRESS;
756+
s->state=TRANS_INPROGRESS;
757+
758+
/*
759+
* Let others to know about current transaction is in progress
760+
* - vadim 11/26/96
761+
*/
762+
if (MyProc!= (PROC*)NULL )
763+
MyProc->xid=s->transactionIdData;
764+
757765
}
758766

759767
/* ---------------
@@ -815,6 +823,13 @@ CommitTransaction()
815823
if (IsNormalProcessingMode())
816824
Async_NotifyAtCommit();
817825
}
826+
827+
/*
828+
* Let others to know about no transaction in progress
829+
* - vadim 11/26/96
830+
*/
831+
if (MyProc!= (PROC*)NULL )
832+
MyProc->xid=InvalidTransactionId;
818833
}
819834

820835
/* --------------------------------
@@ -827,6 +842,13 @@ AbortTransaction()
827842
{
828843
TransactionStates=CurrentTransactionState;
829844

845+
/*
846+
* Let others to know about no transaction in progress
847+
* - vadim 11/26/96
848+
*/
849+
if (MyProc!= (PROC*)NULL )
850+
MyProc->xid=InvalidTransactionId;
851+
830852
/* ----------------
831853
*check the current transaction state
832854
* ----------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp