MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TupFrag.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 TUP_FRAG_HPP
19 #define TUP_FRAG_HPP
20 
21 #include "SignalData.hpp"
22 
23 /*
24  * Add fragment and add attribute signals between LQH and TUP,TUX.
25  * NOTE: return signals from TUP,TUX to LQH must have same format.
26  */
27 
28 // TUP: add fragment
29 
30 class TupFragReq {
31  friend class Dblqh;
32  friend class Dbtup;
33 public:
34  STATIC_CONST( SignalLength = 11 );
35 private:
36  Uint32 userPtr;
37  Uint32 userRef;
38  Uint32 reqInfo;
39  Uint32 tableId;
40  Uint32 fragId;
41  Uint32 maxRowsLow;
42  Uint32 maxRowsHigh;
43  Uint32 minRowsLow;
44  Uint32 minRowsHigh;
45  Uint32 tablespaceid;
46  Uint32 changeMask;
47 };
48 
49 class TupFragConf {
50  friend class Dblqh;
51  friend class Dbtup;
52 public:
53  STATIC_CONST( SignalLength = 4 );
54 private:
55  Uint32 userPtr;
56  Uint32 tupConnectPtr;
57  Uint32 fragPtr;
58  Uint32 fragId;
59 };
60 
61 class TupFragRef {
62  friend class Dblqh;
63  friend class Dbtup;
64 public:
65  STATIC_CONST( SignalLength = 2 );
66 private:
67  Uint32 userPtr;
68  Uint32 errorCode;
69 };
70 
71 // TUX: add fragment
72 
73 class TuxFragReq {
74  friend class Dblqh;
75  friend class Dbtux;
76 public:
77  STATIC_CONST( SignalLength = 9 );
78 private:
79  Uint32 userPtr;
80  Uint32 userRef;
81  Uint32 reqInfo;
82  Uint32 tableId;
83  Uint32 fragId;
84  Uint32 primaryTableId;
85  Uint32 tupIndexFragPtrI;
86  Uint32 tupTableFragPtrI;
87  Uint32 accTableFragPtrI;
88 };
89 
90 class TuxFragConf {
91  friend class Dblqh;
92  friend class Dbtux;
93 public:
94  STATIC_CONST( SignalLength = 4 );
95 private:
96  Uint32 userPtr;
97  Uint32 tuxConnectPtr;
98  Uint32 fragPtr;
99  Uint32 fragId;
100 };
101 
102 class TuxFragRef {
103  friend class Dblqh;
104  friend class Dbtux;
105 public:
106  STATIC_CONST( SignalLength = 2 );
107  enum ErrorCode {
108  NoError = 0,
109  InvalidRequest = 903,
110  NoFreeFragment = 904,
111  NoFreeAttributes = 905
112  };
113 private:
114  Uint32 userPtr;
115  Uint32 errorCode;
116 };
117 
118 // TUP: add attribute
119 
121  friend class Dblqh;
122  friend class Dbtux;
123 public:
124  STATIC_CONST( SignalLength = 5 );
125  STATIC_CONST( DEFAULT_VALUE_SECTION_NUM = 0 );
126 private:
127  Uint32 tupConnectPtr;
128  Uint32 notused1;
129  Uint32 attrId;
130  Uint32 attrDescriptor;
131  Uint32 extTypeInfo;
132 };
133 
135  friend class Dblqh;
136  friend class Dbtup;
137 public:
138  STATIC_CONST( SignalLength = 2 );
139 private:
140  Uint32 userPtr;
141  Uint32 lastAttr; // bool: got last attr and closed frag op
142 };
143 
145  friend class Dblqh;
146  friend class Dbtup;
147 public:
148  STATIC_CONST( SignalLength = 2 );
149  enum ErrorCode {
150  NoError = 0,
151  InvalidCharset = 743,
152  TooManyBitsUsed = 831,
153  UnsupportedType = 906
154  };
155 private:
156  Uint32 userPtr;
157  Uint32 errorCode;
158 };
159 
160 // TUX: add attribute
161 
163  friend class Dblqh;
164  friend class Dbtux;
165 public:
166  STATIC_CONST( SignalLength = 6 );
167 private:
168  Uint32 tuxConnectPtr;
169  Uint32 notused1;
170  Uint32 attrId;
171  Uint32 attrDescriptor;
172  Uint32 extTypeInfo;
173  Uint32 primaryAttrId;
174 };
175 
177  friend class Dblqh;
178  friend class Dbtux;
179 public:
180  STATIC_CONST( SignalLength = 2 );
181 private:
182  Uint32 userPtr;
183  Uint32 lastAttr; // bool: got last attr and closed frag op
184 };
185 
187  friend class Dblqh;
188  friend class Dbtux;
189 public:
190  STATIC_CONST( SignalLength = 2 );
191  enum ErrorCode {
192  NoError = 0,
193  InvalidAttributeType = 906,
194  InvalidCharset = 907,
195  InvalidNodeSize = 908
196  };
197 private:
198  Uint32 userPtr;
199  Uint32 errorCode;
200 };
201 
202 #endif