~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-security

« back to all changes in this revision

Viewing changes to src/backend/utils/resowner/resowner.c

Tags: upstream-8.4.0
ImportĀ upstreamĀ versionĀ 8.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *
15
15
 *
16
16
 * IDENTIFICATION
17
 
 *        $PostgreSQL: pgsql/src/backend/utils/resowner/resowner.c,v 1.31 2009/01/01 17:23:53 momjian Exp $
 
17
 *        $PostgreSQL: pgsql/src/backend/utils/resowner/resowner.c,v 1.32 2009/06/11 14:49:06 momjian Exp $
18
18
 *
19
19
 *-------------------------------------------------------------------------
20
20
 */
312
312
                while (owner->nsnapshots > 0)
313
313
                {
314
314
                        if (isCommit)
315
 
                                PrintSnapshotLeakWarning(owner->snapshots[owner->nsnapshots -1]);
316
 
                        UnregisterSnapshot(owner->snapshots[owner->nsnapshots -1]);
 
315
                                PrintSnapshotLeakWarning(owner->snapshots[owner->nsnapshots - 1]);
 
316
                        UnregisterSnapshot(owner->snapshots[owner->nsnapshots - 1]);
317
317
                }
318
318
 
319
319
                /* Clean up index scans too */
1005
1005
ResourceOwnerForgetSnapshot(ResourceOwner owner, Snapshot snapshot)
1006
1006
{
1007
1007
        Snapshot   *snapshots = owner->snapshots;
1008
 
        int                     ns1 = owner->nsnapshots -1;
 
1008
        int                     ns1 = owner->nsnapshots - 1;
1009
1009
        int                     i;
1010
1010
 
1011
1011
        for (i = ns1; i >= 0; i--)