OSDN Git Service

TupleUpdatedByCurXactAndCmd () changed due to
authorVadim B. Mikheev <vadim4o@yahoo.com>
Fri, 29 Aug 1997 09:12:20 +0000 (09:12 +0000)
committerVadim B. Mikheev <vadim4o@yahoo.com>
Fri, 29 Aug 1997 09:12:20 +0000 (09:12 +0000)
   Fix very old bug which made tuples changed/inserted by a commnd
visible to command itself (so we had multiple update of updated tuples,
etc).

src/backend/access/common/heapvalid.c

index 87668fb..186ee65 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/access/common/Attic/heapvalid.c,v 1.15 1997/08/26 23:31:22 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/access/common/Attic/heapvalid.c,v 1.16 1997/08/29 09:12:20 vadim Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -145,7 +145,7 @@ TupleUpdatedByCurXactAndCmd(HeapTuple t)
 {
     if (TransactionIdEquals(t->t_xmax,
                            GetCurrentTransactionId()) &&
-       t->t_cmax == GetCurrentCommandId())
+       CommandIdGEScanCommandId (t->t_cmax))
        return true;
     
     return false;