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

Commit88868d4

Browse files
committed
Change COMMIT back to the old behavior of emitting command tag COMMIT,
not ROLLBACK, for the case of COMMIT outside a transaction block.Alvaro Herrera
1 parente5ac8db commit88868d4

File tree

1 file changed

+6
-6
lines changed
  • src/backend/access/transam

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.193 2004/10/29 22:19:53 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.194 2004/10/30 20:44:43 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -2538,16 +2538,16 @@ EndTransactionBlock(void)
25382538
break;
25392539

25402540
/*
2541-
*here, theuser issued COMMIT when not inside a transaction.
2542-
*Issue aWARNING and go to abortstate. The upcoming call
2543-
*toCommitTransactionCommand() will thenput us back into
2544-
* the default state.
2541+
*Theuser issued COMMIT when not inside a transaction. Issue a
2542+
* WARNING, staying in TBLOCK_STARTEDstate. The upcoming call to
2543+
* CommitTransactionCommand() will thenclose the transaction and
2544+
*put us back intothe default state.
25452545
*/
25462546
caseTBLOCK_STARTED:
25472547
ereport(WARNING,
25482548
(errcode(ERRCODE_NO_ACTIVE_SQL_TRANSACTION),
25492549
errmsg("there is no transaction in progress")));
2550-
s->blockState=TBLOCK_ABORT_PENDING;
2550+
result=true;
25512551
break;
25522552

25532553
/* These cases are invalid. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp