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, version 2.0, 6 as published by the Free Software Foundation. 7 8 This program is also distributed with certain software (including 9 but not limited to OpenSSL) that is licensed under separate terms, 10 as designated in a particular file or component or in included license 11 documentation. The authors of MySQL hereby grant you an additional 12 permission to link the program and your derivative works with the 13 separately licensed software that they have included with MySQL. 14 15 This program is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License, version 2.0, for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23 */ 24 25 #ifndef TUP_FRAG_HPP 26 #define TUP_FRAG_HPP 27 28 #include "SignalData.hpp" 29 30 /* 31 * Add fragment and add attribute signals between LQH and TUP,TUX. 32 * NOTE: return signals from TUP,TUX to LQH must have same format. 33 */ 34 35 // TUP: add fragment 36 37 class TupFragReq { 38 friend class Dblqh; 39 friend class Dbtup; 40 public: 41 STATIC_CONST( SignalLength = 11 ); 42 private: 43 Uint32 userPtr; 44 Uint32 userRef; 45 Uint32 reqInfo; 46 Uint32 tableId; 47 Uint32 fragId; 48 Uint32 maxRowsLow; 49 Uint32 maxRowsHigh; 50 Uint32 minRowsLow; 51 Uint32 minRowsHigh; 52 Uint32 tablespaceid; 53 Uint32 changeMask; 54 }; 55 56 class TupFragConf { 57 friend class Dblqh; 58 friend class Dbtup; 59 public: 60 STATIC_CONST( SignalLength = 4 ); 61 private: 62 Uint32 userPtr; 63 Uint32 tupConnectPtr; 64 Uint32 fragPtr; 65 Uint32 fragId; 66 }; 67 68 class TupFragRef { 69 friend class Dblqh; 70 friend class Dbtup; 71 public: 72 STATIC_CONST( SignalLength = 2 ); 73 private: 74 Uint32 userPtr; 75 Uint32 errorCode; 76 }; 77 78 // TUX: add fragment 79 80 class TuxFragReq { 81 friend class Dblqh; 82 friend class Dbtux; 83 public: 84 STATIC_CONST( SignalLength = 9 ); 85 private: 86 Uint32 userPtr; 87 Uint32 userRef; 88 Uint32 reqInfo; 89 Uint32 tableId; 90 Uint32 fragId; 91 Uint32 primaryTableId; 92 Uint32 tupIndexFragPtrI; 93 Uint32 tupTableFragPtrI; 94 Uint32 accTableFragPtrI; 95 }; 96 97 class TuxFragConf { 98 friend class Dblqh; 99 friend class Dbtux; 100 public: 101 STATIC_CONST( SignalLength = 4 ); 102 private: 103 Uint32 userPtr; 104 Uint32 tuxConnectPtr; 105 Uint32 fragPtr; 106 Uint32 fragId; 107 }; 108 109 class TuxFragRef { 110 friend class Dblqh; 111 friend class Dbtux; 112 public: 113 STATIC_CONST( SignalLength = 2 ); 114 enum ErrorCode { 115 NoError = 0, 116 InvalidRequest = 903, 117 NoFreeFragment = 904, 118 NoFreeAttributes = 905 119 }; 120 private: 121 Uint32 userPtr; 122 Uint32 errorCode; 123 }; 124 125 // TUP: add attribute 126 127 class TupAddAttrReq { 128 friend class Dblqh; 129 friend class Dbtux; 130 public: 131 STATIC_CONST( SignalLength = 5 ); 132 STATIC_CONST( DEFAULT_VALUE_SECTION_NUM = 0 ); 133 private: 134 Uint32 tupConnectPtr; 135 Uint32 notused1; 136 Uint32 attrId; 137 Uint32 attrDescriptor; 138 Uint32 extTypeInfo; 139 }; 140 141 class TupAddAttrConf { 142 friend class Dblqh; 143 friend class Dbtup; 144 public: 145 STATIC_CONST( SignalLength = 2 ); 146 private: 147 Uint32 userPtr; 148 Uint32 lastAttr; // bool: got last attr and closed frag op 149 }; 150 151 class TupAddAttrRef { 152 friend class Dblqh; 153 friend class Dbtup; 154 public: 155 STATIC_CONST( SignalLength = 2 ); 156 enum ErrorCode { 157 NoError = 0, 158 InvalidCharset = 743, 159 TooManyBitsUsed = 831, 160 UnsupportedType = 906 161 }; 162 private: 163 Uint32 userPtr; 164 Uint32 errorCode; 165 }; 166 167 // TUX: add attribute 168 169 class TuxAddAttrReq { 170 friend class Dblqh; 171 friend class Dbtux; 172 public: 173 STATIC_CONST( SignalLength = 6 ); 174 private: 175 Uint32 tuxConnectPtr; 176 Uint32 notused1; 177 Uint32 attrId; 178 Uint32 attrDescriptor; 179 Uint32 extTypeInfo; 180 Uint32 primaryAttrId; 181 }; 182 183 class TuxAddAttrConf { 184 friend class Dblqh; 185 friend class Dbtux; 186 public: 187 STATIC_CONST( SignalLength = 2 ); 188 private: 189 Uint32 userPtr; 190 Uint32 lastAttr; // bool: got last attr and closed frag op 191 }; 192 193 class TuxAddAttrRef { 194 friend class Dblqh; 195 friend class Dbtux; 196 public: 197 STATIC_CONST( SignalLength = 2 ); 198 enum ErrorCode { 199 NoError = 0, 200 InvalidAttributeType = 906, 201 InvalidCharset = 907, 202 InvalidNodeSize = 908 203 }; 204 private: 205 Uint32 userPtr; 206 Uint32 errorCode; 207 }; 208 209 #endif 210