~vlad-lesin/percona-server/mysql-5.0.33-original

« back to all changes in this revision

Viewing changes to ndb/include/kernel/signaldata/TupFrag.hpp

  • Committer: Vlad Lesin
  • Date: 2012-07-31 09:21:34 UTC
  • Revision ID: vladislav.lesin@percona.com-20120731092134-zfodx022b7992wsi
VirginĀ 5.0.33

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; either version 2 of the License, or
 
6
   (at your option) any later version.
 
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
16
 
 
17
#ifndef TUP_FRAG_HPP
 
18
#define TUP_FRAG_HPP
 
19
 
 
20
#include "SignalData.hpp"
 
21
 
 
22
/*
 
23
 * Add fragment and add attribute signals between LQH and TUP,TUX.
 
24
 * NOTE: return signals from TUP,TUX to LQH must have same format.
 
25
 */
 
26
 
 
27
// TUP: add fragment
 
28
 
 
29
class TupFragReq {
 
30
  friend class Dblqh;
 
31
  friend class Dbtup;
 
32
public:
 
33
  STATIC_CONST( SignalLength = 17 );
 
34
private:
 
35
  Uint32 userPtr;
 
36
  Uint32 userRef;
 
37
  Uint32 reqInfo;
 
38
  Uint32 tableId;
 
39
  Uint32 noOfAttr;
 
40
  Uint32 fragId;
 
41
  Uint32 maxRowsLow;
 
42
  Uint32 maxRowsHigh;
 
43
  Uint32 minRowsLow;
 
44
  Uint32 minRowsHigh;
 
45
  Uint32 noOfNullAttr;
 
46
  Uint32 schemaVersion;
 
47
  Uint32 noOfKeyAttr;
 
48
  Uint16 noOfNewAttr;
 
49
  Uint16 noOfCharsets;
 
50
  Uint32 checksumIndicator;
 
51
  Uint32 noOfAttributeGroups;
 
52
  Uint32 globalCheckpointIdIndicator;
 
53
};
 
54
 
 
55
class TupFragConf {
 
56
  friend class Dblqh;
 
57
  friend class Dbtup;
 
58
public:
 
59
  STATIC_CONST( SignalLength = 4 );
 
60
private:
 
61
  Uint32 userPtr;
 
62
  Uint32 tupConnectPtr;
 
63
  Uint32 fragPtr;
 
64
  Uint32 fragId;
 
65
};
 
66
 
 
67
class TupFragRef {
 
68
  friend class Dblqh;
 
69
  friend class Dbtup;
 
70
public:
 
71
  STATIC_CONST( SignalLength = 2 );
 
72
private:
 
73
  Uint32 userPtr;
 
74
  Uint32 errorCode;
 
75
};
 
76
 
 
77
// TUX: add fragment
 
78
 
 
79
class TuxFragReq {
 
80
  friend class Dblqh;
 
81
  friend class Dbtux;
 
82
public:
 
83
  STATIC_CONST( SignalLength = 14 );
 
84
private:
 
85
  Uint32 userPtr;
 
86
  Uint32 userRef;
 
87
  Uint32 reqInfo;
 
88
  Uint32 tableId;
 
89
  Uint32 noOfAttr;
 
90
  Uint32 fragId;
 
91
  Uint32 fragOff;
 
92
  Uint32 tableType;
 
93
  Uint32 primaryTableId;
 
94
  Uint32 tupIndexFragPtrI;
 
95
  Uint32 tupTableFragPtrI[2];
 
96
  Uint32 accTableFragPtrI[2];
 
97
};
 
98
 
 
99
class TuxFragConf {
 
100
  friend class Dblqh;
 
101
  friend class Dbtux;
 
102
public:
 
103
  STATIC_CONST( SignalLength = 4 );
 
104
private:
 
105
  Uint32 userPtr;
 
106
  Uint32 tuxConnectPtr;
 
107
  Uint32 fragPtr;
 
108
  Uint32 fragId;
 
109
};
 
110
 
 
111
class TuxFragRef {
 
112
  friend class Dblqh;
 
113
  friend class Dbtux;
 
114
public:
 
115
  STATIC_CONST( SignalLength = 2 );
 
116
  enum ErrorCode {
 
117
    NoError = 0,
 
118
    InvalidRequest = 903,
 
119
    NoFreeFragment = 904,
 
120
    NoFreeAttributes = 905
 
121
  };
 
122
private:
 
123
  Uint32 userPtr;
 
124
  Uint32 errorCode;
 
125
};
 
126
 
 
127
// TUP: add attribute
 
128
 
 
129
class TupAddAttrReq {
 
130
  friend class Dblqh;
 
131
  friend class Dbtux;
 
132
public:
 
133
  STATIC_CONST( SignalLength = 5 );
 
134
private:
 
135
  Uint32 tupConnectPtr;
 
136
  Uint32 notused1;
 
137
  Uint32 attrId;
 
138
  Uint32 attrDescriptor;
 
139
  Uint32 extTypeInfo;
 
140
};
 
141
 
 
142
class TupAddAttrConf {
 
143
  friend class Dblqh;
 
144
  friend class Dbtup;
 
145
public:
 
146
  STATIC_CONST( SignalLength = 2 );
 
147
private:
 
148
  Uint32 userPtr;
 
149
  Uint32 lastAttr; // bool: got last attr and closed frag op
 
150
};
 
151
 
 
152
class TupAddAttrRef {
 
153
  friend class Dblqh;
 
154
  friend class Dbtup;
 
155
public:
 
156
  STATIC_CONST( SignalLength = 2 );
 
157
  enum ErrorCode {
 
158
    NoError = 0,
 
159
    InvalidCharset = 743,
 
160
    TooManyBitsUsed = 831,
 
161
    UnsupportedType = 906
 
162
  };
 
163
private:
 
164
  Uint32 userPtr;
 
165
  Uint32 errorCode;
 
166
};
 
167
 
 
168
// TUX: add attribute
 
169
 
 
170
class TuxAddAttrReq {
 
171
  friend class Dblqh;
 
172
  friend class Dbtux;
 
173
public:
 
174
  STATIC_CONST( SignalLength = 6 );
 
175
private:
 
176
  Uint32 tuxConnectPtr;
 
177
  Uint32 notused1;
 
178
  Uint32 attrId;
 
179
  Uint32 attrDescriptor;
 
180
  Uint32 extTypeInfo;
 
181
  Uint32 primaryAttrId;
 
182
};
 
183
 
 
184
class TuxAddAttrConf {
 
185
  friend class Dblqh;
 
186
  friend class Dbtux;
 
187
public:
 
188
  STATIC_CONST( SignalLength = 2 );
 
189
private:
 
190
  Uint32 userPtr;
 
191
  Uint32 lastAttr; // bool: got last attr and closed frag op
 
192
};
 
193
 
 
194
class TuxAddAttrRef {
 
195
  friend class Dblqh;
 
196
  friend class Dbtux;
 
197
public:
 
198
  STATIC_CONST( SignalLength = 2 );
 
199
  enum ErrorCode {
 
200
    NoError = 0,
 
201
    InvalidAttributeType = 906,
 
202
    InvalidCharset = 907,
 
203
    InvalidNodeSize = 908
 
204
  };
 
205
private:
 
206
  Uint32 userPtr;
 
207
  Uint32 errorCode;
 
208
};
 
209
 
 
210
#endif