MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DictTakeover.hpp
1 /* Copyright 2008 Sun Microsystems, Inc.
2  All rights reserved. Use is subject to license terms.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 
17 #ifndef DICT_TAKEOVER_HPP
18 #define DICT_TAKEOVER_HPP
19 
20 #include "SignalData.hpp"
21 
22 // see comments in Dbdict.hpp
23 
25  friend class Dbdict;
26 public:
27  STATIC_CONST( SignalLength = 1 );
28  STATIC_CONST( GSN = GSN_DICT_TAKEOVER_REQ );
29 private:
30  Uint32 senderRef;
31 };
32 
34  friend class Dbdict;
35 public:
36  STATIC_CONST( SignalLength = 10 );
37  STATIC_CONST( GSN = GSN_DICT_TAKEOVER_CONF );
38 private:
39  Uint32 senderRef;
40  Uint32 clientRef;
41  Uint32 trans_key;
42  Uint32 trans_state;
43  Uint32 op_count;
44  union
45  {
46  Uint32 rollforward_op; // Preferred starting point for rollforward
47  Uint32 lowest_op; // Next operation to be ended (removed)
48  };
49  union {
50  Uint32 rollforward_op_state;
51  Uint32 lowest_op_state;
52  };
53  union {
54  Uint32 rollback_op; // Preferred starting point for rollback
55  Uint32 highest_op; // Last parsed operation
56  };
57  union {
58  Uint32 rollback_op_state;
59  Uint32 highest_op_state;
60  };
61  // Highest/lowest op is needed if new master is missing one operation
62  union {
63  Uint32 lowest_op_impl_req_gsn;
64  Uint32 highest_op_impl_req_gsn;
65  };
66 };
67 
69  STATIC_CONST( SignalLength = 3 );
70  STATIC_CONST( GSN = GSN_DICT_TAKEOVER_REF );
71 
72  Uint32 senderRef;
73  union { Uint32 masterRef, senderData; };
74  Uint32 errorCode;
75  enum ErrorCode
76  {
77  NoError = 0,
78  NoTransaction = 1,
79  NF_FakeErrorREF = 2
80  };
81 };
82 
83 
84 #endif