~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ndb/include/kernel/signaldata/LqhFrag.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
#ifndef LQH_FRAG_HPP
 
17
#define LQH_FRAG_HPP
 
18
 
 
19
#include "SignalData.hpp"
 
20
 
 
21
class AddFragReq {
 
22
  /**
 
23
   * Sender(s)
 
24
   */
 
25
  friend class Dbdih;
 
26
 
 
27
  /**
 
28
   * Receiver(s)
 
29
   */
 
30
  friend class Dbdict;
 
31
  
 
32
  friend bool printADD_FRAG_REQ(FILE *, const Uint32 *, Uint32, Uint16);
 
33
 
 
34
public:
 
35
  STATIC_CONST( SignalLength = 11 );
 
36
  
 
37
  enum RequestInfo {
 
38
    CreateInRunning = 0x8000000,
 
39
    TemporaryTable = 0x00000010
 
40
  };
 
41
private:
 
42
  Uint32 dihPtr;
 
43
  Uint32 senderData; // The same data as sent in DIADDTABREQ
 
44
  Uint32 fragmentId;
 
45
  Uint32 requestInfo; 
 
46
  Uint32 tableId;
 
47
  Uint32 nextLCP;
 
48
  Uint32 nodeId;
 
49
  Uint32 totalFragments;
 
50
  Uint32 startGci;
 
51
  Uint32 tablespaceId;
 
52
  Uint32 logPartId;
 
53
};
 
54
 
 
55
class AddFragRef {
 
56
  /**
 
57
   * Sender(s)
 
58
   */
 
59
  friend class Dbdict;
 
60
 
 
61
  /**
 
62
   * Receiver(s)
 
63
   */
 
64
  friend class Dbdih;
 
65
 
 
66
  friend bool printADD_FRAG_REF(FILE *, const Uint32 *, Uint32, Uint16);
 
67
public:
 
68
  STATIC_CONST( SignalLength = 1 );
 
69
  
 
70
private:
 
71
  Uint32 dihPtr;
 
72
};
 
73
 
 
74
class AddFragConf {
 
75
  /**
 
76
   * Sender(s)
 
77
   */
 
78
  friend class Dbdict;
 
79
 
 
80
  /**
 
81
   * Receiver(s)
 
82
   */
 
83
  friend class Dbdih;
 
84
 
 
85
  friend bool printADD_FRAG_CONF(FILE *, const Uint32 *, Uint32, Uint16);
 
86
public:
 
87
  STATIC_CONST( SignalLength = 2 );
 
88
  
 
89
private:
 
90
  Uint32 dihPtr;
 
91
  Uint32 fragId;
 
92
};
 
93
 
 
94
class LqhFragReq {
 
95
  /**
 
96
   * Sender(s)
 
97
   */
 
98
  friend class Dbdict;
 
99
 
 
100
  /**
 
101
   * Receiver(s)
 
102
   */
 
103
  friend class Dblqh;
 
104
  
 
105
  friend bool printLQH_FRAG_REQ(FILE *, const Uint32 *, Uint32, Uint16);
 
106
 
 
107
public:
 
108
  STATIC_CONST( SignalLength = 25 );
 
109
  
 
110
  enum RequestInfo {
 
111
    CreateInRunning = 0x8000000,
 
112
    TemporaryTable = 0x00000010
 
113
  };
 
114
 
 
115
private:
 
116
  Uint32 senderData;
 
117
  Uint32 senderRef;
 
118
  Uint32 fragmentId;
 
119
  Uint32 requestInfo; 
 
120
  Uint32 maxLoadFactor;
 
121
  Uint32 minLoadFactor;
 
122
  Uint32 kValue;
 
123
  Uint32 schemaVersion;
 
124
  Uint32 nextLCP;
 
125
  Uint32 noOfCharsets;
 
126
  Uint32 startGci;
 
127
  Uint32 tableType;             // DictTabInfo::TableType
 
128
  Uint32 primaryTableId;        // table of index or RNIL
 
129
  Uint32 tablespace_id;       // RNIL for MM table
 
130
  Uint16 tableId;
 
131
  Uint16 localKeyLength;
 
132
  Uint16 lh3DistrBits;
 
133
  Uint16 lh3PageBits;
 
134
  Uint16 noOfAttributes;
 
135
  Uint16 noOfNullAttributes;
 
136
  Uint16 noOfPagesToPreAllocate;
 
137
  Uint16 keyLength;
 
138
  Uint16 noOfKeyAttr;
 
139
  Uint8 checksumIndicator;
 
140
  Uint8 GCPIndicator;
 
141
  Uint32 logPartId;
 
142
  Uint32 maxRowsLow;
 
143
  Uint32 maxRowsHigh;
 
144
  Uint32 minRowsLow;
 
145
  Uint32 minRowsHigh;
 
146
  Uint32 forceVarPartFlag;
 
147
};
 
148
 
 
149
class LqhFragConf {
 
150
  /**
 
151
   * Sender(s)
 
152
   */
 
153
  friend class Dblqh;
 
154
 
 
155
  /**
 
156
   * Receiver(s)
 
157
   */
 
158
  friend class Dbdict;
 
159
 
 
160
  friend bool printLQH_FRAG_CONF(FILE *, const Uint32 *, Uint32, Uint16);
 
161
public:
 
162
  STATIC_CONST( SignalLength = 2 );
 
163
 
 
164
private:
 
165
  Uint32 senderData;
 
166
  Uint32 lqhFragPtr;
 
167
};
 
168
 
 
169
class LqhFragRef {
 
170
  /**
 
171
   * Sender(s)
 
172
   */
 
173
  friend class Dblqh;
 
174
 
 
175
  /**
 
176
   * Receiver(s)
 
177
   */
 
178
  friend class Dbdict;
 
179
 
 
180
  friend bool printLQH_FRAG_REF(FILE *, const Uint32 *, Uint32, Uint16);
 
181
public:
 
182
  STATIC_CONST( SignalLength = 2 );
 
183
 
 
184
private:
 
185
  Uint32 senderData;
 
186
  Uint32 errorCode;
 
187
};
 
188
 
 
189
class LqhAddAttrReq {
 
190
  /**
 
191
   * Sender(s)
 
192
   */
 
193
  friend class Dbdict;
 
194
 
 
195
  /**
 
196
   * Receiver(s)
 
197
   */
 
198
  friend class Dblqh;
 
199
 
 
200
  friend bool printLQH_ADD_ATTR_REQ(FILE *, const Uint32 *, Uint32, Uint16);
 
201
public:
 
202
  STATIC_CONST( HeaderLength = 4 );
 
203
  STATIC_CONST( EntryLength = 3 );
 
204
  STATIC_CONST( MAX_ATTRIBUTES = 6 );
 
205
  struct Entry {
 
206
    Uint32 attrId;              // for index, includes primary attr id << 16
 
207
    Uint32 attrDescriptor;      // 2 words type info
 
208
    Uint32 extTypeInfo;
 
209
  };
 
210
private:
 
211
  Uint32 lqhFragPtr;
 
212
  Uint32 noOfAttributes;
 
213
  Uint32 senderData;
 
214
  Uint32 senderAttrPtr;
 
215
  Entry attributes[MAX_ATTRIBUTES];
 
216
};
 
217
 
 
218
class LqhAddAttrRef {
 
219
  /**
 
220
   * Sender(s)
 
221
   */
 
222
  friend class Dblqh;
 
223
  
 
224
  /**
 
225
   * Receiver(s)
 
226
   */
 
227
  friend class Dbdict;
 
228
 
 
229
  friend bool printLQH_ADD_ATTR_REF(FILE *, const Uint32 *, Uint32, Uint16);
 
230
public:
 
231
  STATIC_CONST( SignalLength = 2 );
 
232
 
 
233
private:
 
234
  Uint32 senderData;
 
235
  Uint32 errorCode;
 
236
};
 
237
 
 
238
class LqhAddAttrConf {
 
239
  /**
 
240
   * Sender(s)
 
241
   */
 
242
  friend class Dblqh;
 
243
  
 
244
  /**
 
245
   * Receiver(s)
 
246
   */
 
247
  friend class Dbdict;
 
248
 
 
249
  friend bool printLQH_ADD_ATTR_CONF(FILE *, const Uint32 *, Uint32, Uint16);
 
250
public:
 
251
  STATIC_CONST( SignalLength = 3 );
 
252
 
 
253
private:
 
254
  Uint32 senderData;
 
255
  Uint32 senderAttrPtr;
 
256
  Uint32 fragId;
 
257
};
 
258
 
 
259
#endif