MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LqhFrag.hpp
1 /*
2  Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
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 St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef LQH_FRAG_HPP
19 #define LQH_FRAG_HPP
20 
21 #include "SignalData.hpp"
22 
23 class AddFragReq {
27  friend class Dbdih;
28 
32  friend class Dbdict;
33 
34  friend bool printADD_FRAG_REQ(FILE *, const Uint32 *, Uint32, Uint16);
35 
36 public:
37  STATIC_CONST( SignalLength = 12 );
38 
39  enum RequestInfo {
40  CreateInRunning = 0x8000000,
41  TemporaryTable = 0x00000010
42  };
43 private:
44  Uint32 dihPtr;
45  Uint32 senderData; // The same data as sent in DIADDTABREQ
46  Uint32 fragmentId;
47  Uint32 requestInfo;
48  Uint32 tableId;
49  Uint32 nextLCP;
50  Uint32 nodeId;
51  Uint32 totalFragments;
52  Uint32 startGci;
53  Uint32 tablespaceId;
54  Uint32 logPartId;
55  Uint32 changeMask;
56 };
57 
58 class AddFragRef {
62  friend class Dbdict;
63 
67  friend class Dbdih;
68 
69  friend bool printADD_FRAG_REF(FILE *, const Uint32 *, Uint32, Uint16);
70 public:
71  STATIC_CONST( SignalLength = 2 );
72 
73 private:
74  Uint32 dihPtr;
75  Uint32 fragId;
76 };
77 
78 class AddFragConf {
82  friend class Dbdict;
83 
87  friend class Dbdih;
88 
89  friend bool printADD_FRAG_CONF(FILE *, const Uint32 *, Uint32, Uint16);
90 public:
91  STATIC_CONST( SignalLength = 2 );
92 
93 private:
94  Uint32 dihPtr;
95  Uint32 fragId;
96 };
97 
98 class LqhFragReq {
102  friend class Dbdict;
103 
107  friend class Dblqh;
108  friend class DblqhProxy;
109 
110  friend bool printLQH_FRAG_REQ(FILE *, const Uint32 *, Uint32, Uint16);
111 
112 public:
113  STATIC_CONST( SignalLength = 22 );
114 
115  enum RequestInfo {
116  CreateInRunning = 0x8000000,
117  TemporaryTable = 0x00000010
118  };
119 
120 private:
121  Uint32 senderData;
122  Uint32 senderRef;
123  Uint32 tableId;
124  Uint32 tableVersion;
125 
126  Uint32 nextLCP;
127  Uint32 startGci;
128  union {
129  Uint32 fragmentId;
130  Uint32 fragId;
131  };
132  Uint32 requestInfo;
133 
134  Uint32 localKeyLength;
135  Uint32 lh3DistrBits;
136  Uint32 lh3PageBits;
137  Uint32 keyLength;
138  Uint32 maxLoadFactor;
139  Uint32 minLoadFactor;
140  Uint32 kValue;
141 
142  Uint32 logPartId;
143  Uint32 tablespace_id; // RNIL for MM table
144  Uint32 maxRowsLow;
145  Uint32 maxRowsHigh;
146  Uint32 minRowsLow;
147  Uint32 minRowsHigh;
148  Uint32 changeMask;
149 };
150 
151 class LqhFragConf {
155  friend class Dblqh;
156  friend class DblqhProxy;
157 
161  friend class Dbdict;
162 
163  friend bool printLQH_FRAG_CONF(FILE *, const Uint32 *, Uint32, Uint16);
164 public:
165  STATIC_CONST( SignalLength = 5 );
166 
167 private:
168  Uint32 senderData;
169  Uint32 lqhFragPtr;
170  Uint32 tableId;
171  Uint32 fragId;
172  Uint32 changeMask;
173 };
174 
175 class LqhFragRef {
179  friend class Dblqh;
180  friend class DblqhProxy;
181 
185  friend class Dbdict;
186 
187  friend bool printLQH_FRAG_REF(FILE *, const Uint32 *, Uint32, Uint16);
188 public:
189  STATIC_CONST( SignalLength = 6 );
190 
191 private:
192  Uint32 senderData;
193  Uint32 errorCode;
194  Uint32 tableId;
195  Uint32 fragId;
196  Uint32 requestInfo;
197  Uint32 changeMask;
198 };
199 
204  friend class Dbdict;
205 
209  friend class Dblqh;
210  friend class DblqhProxy;
211 
212  friend bool printLQH_ADD_ATTR_REQ(FILE *, const Uint32 *, Uint32, Uint16);
213 public:
214  STATIC_CONST( HeaderLength = 4 );
215  STATIC_CONST( EntryLength = 3 );
216  STATIC_CONST( MAX_ATTRIBUTES = 6 );
217  STATIC_CONST( DEFAULT_VALUE_SECTION_NUM = 0 );
218  struct Entry {
219  Uint32 attrId; // for index, includes primary attr id << 16
220  Uint32 attrDescriptor; // 2 words type info
221  Uint32 extTypeInfo;
222  };
223 private:
224  Uint32 lqhFragPtr;
225  Uint32 noOfAttributes;
226  Uint32 senderData;
227  Uint32 senderAttrPtr;
228  Entry attributes[MAX_ATTRIBUTES];
229 };
230 
235  friend class Dblqh;
236  friend class DblqhProxy;
237 
241  friend class Dbdict;
242 
243  friend bool printLQH_ADD_ATTR_REF(FILE *, const Uint32 *, Uint32, Uint16);
244 public:
245  STATIC_CONST( SignalLength = 2 );
246 
247 private:
248  Uint32 senderData;
249  Uint32 errorCode;
250 };
251 
256  friend class Dblqh;
257  friend class DblqhProxy;
258 
262  friend class Dbdict;
263 
264  friend bool printLQH_ADD_ATTR_CONF(FILE *, const Uint32 *, Uint32, Uint16);
265 public:
266  STATIC_CONST( SignalLength = 2 );
267 
268 private:
269  Uint32 senderData;
270  Uint32 senderAttrPtr;
271 };
272 
274 {
275  STATIC_CONST( SignalLength = 5 );
276  enum RequestInfo
277  {
278  AlterTableAbort = 0x1
279  };
280  Uint32 senderRef;
281  Uint32 senderData;
282  Uint32 tableId;
283  Uint32 fragId;
284  Uint32 requestInfo;
285 };
286 
288 {
289  STATIC_CONST( SignalLength = 5 );
290  Uint32 senderRef;
291  Uint32 senderData;
292  Uint32 tableId;
293  Uint32 fragId;
294  Uint32 errCode;
295 };
296 
298 {
299  STATIC_CONST( SignalLength = 4 );
300  Uint32 senderRef;
301  Uint32 senderData;
302  Uint32 tableId;
303  Uint32 fragId;
304 };
305 
306 #endif