1 /* 2 Copyright (c) 2003, 2016, 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 #define JAM_FILE_ID 197 31 32 33 /* 34 * Add fragment and add attribute signals between LQH and TUP,TUX. 35 * NOTE: return signals from TUP,TUX to LQH must have same format. 36 */ 37 38 // TUP: add fragment 39 40 class TupFragReq { 41 friend class Dblqh; 42 friend class Dbtup; 43 public: 44 STATIC_CONST( SignalLength = 12 ); 45 private: 46 Uint32 userPtr; 47 Uint32 userRef; 48 Uint32 reqInfo; 49 Uint32 tableId; 50 Uint32 fragId; 51 Uint32 maxRowsLow; 52 Uint32 maxRowsHigh; 53 Uint32 minRowsLow; 54 Uint32 minRowsHigh; 55 Uint32 tablespaceid; 56 Uint32 changeMask; 57 Uint32 partitionId; 58 }; 59 60 class TupFragConf { 61 friend class Dblqh; 62 friend class Dbtup; 63 public: 64 STATIC_CONST( SignalLength = 4 ); 65 private: 66 Uint32 userPtr; 67 Uint32 tupConnectPtr; 68 Uint32 fragPtr; 69 Uint32 fragId; 70 }; 71 72 class TupFragRef { 73 friend class Dblqh; 74 friend class Dbtup; 75 public: 76 STATIC_CONST( SignalLength = 2 ); 77 private: 78 Uint32 userPtr; 79 Uint32 errorCode; 80 }; 81 82 // TUX: add fragment 83 84 class TuxFragReq { 85 friend class Dblqh; 86 friend class Dbtux; 87 public: 88 STATIC_CONST( SignalLength = 9 ); 89 private: 90 Uint32 userPtr; 91 Uint32 userRef; 92 Uint32 reqInfo; 93 Uint32 tableId; 94 Uint32 fragId; 95 Uint32 primaryTableId; 96 Uint32 tupIndexFragPtrI; 97 Uint32 tupTableFragPtrI; 98 Uint32 accTableFragPtrI; 99 }; 100 101 class TuxFragConf { 102 friend class Dblqh; 103 friend class Dbtux; 104 public: 105 STATIC_CONST( SignalLength = 4 ); 106 private: 107 Uint32 userPtr; 108 Uint32 tuxConnectPtr; 109 Uint32 fragPtr; 110 Uint32 fragId; 111 }; 112 113 class TuxFragRef { 114 friend class Dblqh; 115 friend class Dbtux; 116 public: 117 STATIC_CONST( SignalLength = 2 ); 118 enum ErrorCode { 119 NoError = 0, 120 InvalidRequest = 903, 121 NoFreeFragment = 904, 122 NoFreeAttributes = 905 123 }; 124 private: 125 Uint32 userPtr; 126 Uint32 errorCode; 127 }; 128 129 // TUP: add attribute 130 131 class TupAddAttrReq { 132 friend class Dblqh; 133 friend class Dbtux; 134 public: 135 STATIC_CONST( SignalLength = 5 ); 136 STATIC_CONST( DEFAULT_VALUE_SECTION_NUM = 0 ); 137 private: 138 Uint32 tupConnectPtr; 139 Uint32 notused1; 140 Uint32 attrId; 141 Uint32 attrDescriptor; 142 Uint32 extTypeInfo; 143 }; 144 145 class TupAddAttrConf { 146 friend class Dblqh; 147 friend class Dbtup; 148 public: 149 STATIC_CONST( SignalLength = 2 ); 150 private: 151 Uint32 userPtr; 152 Uint32 lastAttr; // bool: got last attr and closed frag op 153 }; 154 155 class TupAddAttrRef { 156 friend class Dblqh; 157 friend class Dbtup; 158 public: 159 STATIC_CONST( SignalLength = 2 ); 160 enum ErrorCode { 161 NoError = 0, 162 InvalidCharset = 743, 163 TooManyBitsUsed = 831, 164 UnsupportedType = 906 165 }; 166 private: 167 Uint32 userPtr; 168 Uint32 errorCode; 169 }; 170 171 // TUX: add attribute 172 173 class TuxAddAttrReq { 174 friend class Dblqh; 175 friend class Dbtux; 176 public: 177 STATIC_CONST( SignalLength = 6 ); 178 private: 179 Uint32 tuxConnectPtr; 180 Uint32 notused1; 181 Uint32 attrId; 182 Uint32 attrDescriptor; 183 Uint32 extTypeInfo; 184 Uint32 primaryAttrId; 185 }; 186 187 class TuxAddAttrConf { 188 friend class Dblqh; 189 friend class Dbtux; 190 public: 191 STATIC_CONST( SignalLength = 2 ); 192 private: 193 Uint32 userPtr; 194 Uint32 lastAttr; // bool: got last attr and closed frag op 195 }; 196 197 class TuxAddAttrRef { 198 friend class Dblqh; 199 friend class Dbtux; 200 public: 201 STATIC_CONST( SignalLength = 2 ); 202 enum ErrorCode { 203 NoError = 0, 204 InvalidAttributeType = 906, 205 InvalidCharset = 907, 206 InvalidNodeSize = 908 207 }; 208 private: 209 Uint32 userPtr; 210 Uint32 errorCode; 211 }; 212 213 214 #undef JAM_FILE_ID 215 216 #endif 217