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

« back to all changes in this revision

Viewing changes to libdb/db_printlog/status.awk

  • 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
 
# $Id$
2
 
#
3
 
# Read through db_printlog output and list all the transactions encountered
4
 
# and whether they commited or aborted.
5
 
#
6
 
# 1 = started
7
 
# 2 = commited
8
 
# 3 = explicitly aborted
9
 
# 4 = other
10
 
BEGIN {
11
 
        cur_txn = 0
12
 
}
13
 
/^\[/{
14
 
        in_regop = 0
15
 
        if (status[$5] == 0) {
16
 
                status[$5] = 1;
17
 
                txns[cur_txn] = $5;
18
 
                cur_txn++;
19
 
        }
20
 
}
21
 
/txn_regop/ {
22
 
        txnid = $5
23
 
        in_regop = 1
24
 
}
25
 
/opcode:/ {
26
 
        if (in_regop == 1) {
27
 
                if ($2 == 1)
28
 
                        status[txnid] = 2
29
 
                else if ($2 == 3)
30
 
                        status[txnid] = 3
31
 
                else
32
 
                        status[txnid] = 4
33
 
        }
34
 
}
35
 
END {
36
 
        for (i = 0; i < cur_txn; i++) {
37
 
                if (status[txns[i]] == 1)
38
 
                        printf("%s\tABORT\n", txns[i]);
39
 
                if (status[txns[i]] == 2)
40
 
                        printf("%s\tCOMMIT\n", txns[i]);
41
 
                if (status[txns[i]] == 3)
42
 
                        printf("%s\tABORT\n", txns[i]);
43
 
                if (status[txns[i]] == 4)
44
 
                        printf("%s\tOTHER\n", txns[i]);
45
 
        }
46
 
}