summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2004-10-30 20:44:43 +0000
committerTom Lane2004-10-30 20:44:43 +0000
commit88868d4fbcef1e5d608c0305670465a2a0651c9e (patch)
tree51699d1ed24b9e38dc2cb1730651ccd10faada1f
parente5ac8db035d216290d2e526859a0ec58de86f3c2 (diff)
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
-rw-r--r--src/backend/access/transam/xact.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 583fb36a6f6..40f26822e6c 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.193 2004/10/29 22:19:53 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.194 2004/10/30 20:44:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2538,16 +2538,16 @@ EndTransactionBlock(void)
break;
/*
- * here, the user issued COMMIT when not inside a transaction.
- * Issue a WARNING and go to abort state. The upcoming call
- * to CommitTransactionCommand() will then put us back into
- * the default state.
+ * The user issued COMMIT when not inside a transaction. Issue a
+ * WARNING, staying in TBLOCK_STARTED state. The upcoming call to
+ * CommitTransactionCommand() will then close the transaction and
+ * put us back into the default state.
*/
case TBLOCK_STARTED:
ereport(WARNING,
(errcode(ERRCODE_NO_ACTIVE_SQL_TRANSACTION),
errmsg("there is no transaction in progress")));
- s->blockState = TBLOCK_ABORT_PENDING;
+ result = true;
break;
/* These cases are invalid. */