~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/test/txn004.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# See the file LICENSE for redistribution information.
2
 
#
3
 
# Copyright (c) 1996-2002
4
 
#       Sleepycat Software.  All rights reserved.
5
 
#
6
 
# $Id$
7
 
#
8
 
 
9
 
# TEST  txn004
10
 
# TEST  Test of wraparound txnids (txn001)
11
 
proc txn004 { } {
12
 
        source ./include.tcl
13
 
        global txn_curid
14
 
        global txn_maxid
15
 
 
16
 
        set orig_curid $txn_curid
17
 
        set orig_maxid $txn_maxid
18
 
        puts "\tTxn004.1: wraparound txnids"
19
 
        set txn_curid [expr $txn_maxid - 2]
20
 
        txn001 "04.1"
21
 
        puts "\tTxn004.2: closer wraparound txnids"
22
 
        set txn_curid [expr $txn_maxid - 3]
23
 
        set txn_maxid [expr $txn_maxid - 2]
24
 
        txn001 "04.2"
25
 
 
26
 
        puts "\tTxn004.3: test wraparound txnids"
27
 
        txn_idwrap_check $testdir
28
 
        set txn_curid $orig_curid
29
 
        set txn_maxid $orig_maxid
30
 
        return
31
 
}
32
 
 
33
 
proc txn_idwrap_check { testdir } {
34
 
        global txn_curid
35
 
        global txn_maxid
36
 
 
37
 
        env_cleanup $testdir
38
 
 
39
 
        # Open/create the txn region
40
 
        set e [berkdb_env -create -txn -home $testdir]
41
 
        error_check_good env_open [is_substr $e env] 1
42
 
 
43
 
        set txn1 [$e txn]
44
 
        error_check_good txn1 [is_valid_txn $txn1 $e] TRUE
45
 
        error_check_good txn_id_set \
46
 
            [$e txn_id_set [expr $txn_maxid - 1] $txn_maxid] 0
47
 
 
48
 
        set txn2 [$e txn]
49
 
        error_check_good txn2 [is_valid_txn $txn2 $e] TRUE
50
 
 
51
 
        # txn3 will require a wraparound txnid
52
 
        # XXX How can we test it has a wrapped id?
53
 
        set txn3 [$e txn]
54
 
        error_check_good wrap_txn3 [is_valid_txn $txn3 $e] TRUE
55
 
 
56
 
        error_check_good free_txn1 [$txn1 commit] 0
57
 
        error_check_good free_txn2 [$txn2 commit] 0
58
 
        error_check_good free_txn3 [$txn3 commit] 0
59
 
 
60
 
        error_check_good close [$e close] 0
61
 
}
62