TupleUpdatedByCurXactAndCmd () changed due to
authorVadim B. Mikheev
Fri, 29 Aug 1997 09:12:20 +0000 (09:12 +0000)
committerVadim B. Mikheev
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 87668fbb438106f074313c249a3eb5b888a43300..186ee654b32655d9f05cf05cc259e0b459aeb5e1 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;