~codership/galera/3.x

« back to all changes in this revision

Viewing changes to galera/src/trx_handle.hpp

  • Committer: Teemu Ollakka
  • Date: 2013-11-02 18:55:06 UTC
  • Revision ID: teemu.ollakka@codership.com-20131102185506-irok2p8fyb2dtf00
References lp:1247402 - synced with svn #3355 (integrated with wsrepi api v25)

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
            F_PREORDERED  = 1 << 8
66
66
        };
67
67
 
68
 
        static inline uint64_t wsrep_flags_to_trx_flags (uint64_t flags)
 
68
        static inline uint32_t wsrep_flags_to_trx_flags (uint32_t flags)
69
69
        {
70
70
            uint64_t ret(0);
71
71
 
77
77
            return ret;
78
78
        }
79
79
 
 
80
        static inline uint32_t trx_flags_to_wsrep_flags (uint32_t flags)
 
81
        {
 
82
            uint64_t ret(0);
 
83
 
 
84
            if (flags & F_COMMIT)      ret |= WSREP_FLAG_COMMIT;
 
85
            if (flags & F_ROLLBACK)    ret |= WSREP_FLAG_ROLLBACK;
 
86
            if (flags & F_PA_UNSAFE)   ret |= WSREP_FLAG_PA_UNSAFE;
 
87
            if (flags & F_ISOLATION)   ret |= WSREP_FLAG_ISOLATION;
 
88
 
 
89
            return ret;
 
90
        }
 
91
 
80
92
        bool has_mac() const
81
93
        {
82
94
            return ((write_set_flags_ & (F_MAC_HEADER | F_MAC_PAYLOAD)) != 0);