1 /* 2 Copyright (c) 2005, 2021, Oracle and/or its affiliates. 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 CREATE_FILEGROUP_HPP 26 #define CREATE_FILEGROUP_HPP 27 28 #include "SignalData.hpp" 29 30 #define JAM_FILE_ID 98 31 32 33 struct CreateFilegroupReq { 34 /** 35 * Sender(s) / Reciver(s) 36 */ 37 friend class NdbDictInterface; 38 friend class Dbdict; 39 40 /** 41 * For printing 42 */ 43 friend bool printCREATE_FILEGROUP_REQ(FILE*, const Uint32*, Uint32, Uint16); 44 45 STATIC_CONST( SignalLength = 6 ); 46 47 union { 48 Uint32 senderData; 49 Uint32 clientData; 50 }; 51 union { 52 Uint32 senderRef; 53 Uint32 clientRef; 54 }; 55 Uint32 objType; 56 Uint32 requestInfo; 57 Uint32 transId; 58 Uint32 transKey; 59 SECTION( FILEGROUP_INFO = 0 ); 60 }; 61 62 struct CreateFilegroupRef { 63 /** 64 * Sender(s) 65 */ 66 friend class Dbdict; 67 68 /** 69 * Sender(s) / Reciver(s) 70 */ 71 friend class NdbDictInterface; 72 73 /** 74 * For printing 75 */ 76 friend bool printCREATE_FILEGROUP_REF(FILE*, const Uint32*, Uint32, Uint16); 77 78 STATIC_CONST( SignalLength = 7 ); 79 80 enum ErrorCode { 81 NoError = 0, 82 Busy = 701, 83 NotMaster = 702, 84 NoMoreObjectRecords = 710, 85 InvalidFormat = 740, 86 OutOfFilegroupRecords = 765, 87 InvalidExtentSize = 764, 88 InvalidUndoBufferSize = 779, 89 NoSuchLogfileGroup = 767, 90 InvalidFilegroupVersion = 768, 91 SingleUser = 299 92 }; 93 94 Uint32 senderData; 95 Uint32 senderRef; 96 Uint32 masterNodeId; 97 Uint32 errorCode; 98 Uint32 errorLine; 99 Uint32 errorNodeId; 100 Uint32 transId; 101 }; 102 103 struct CreateFilegroupConf { 104 /** 105 * Sender(s) 106 */ 107 friend class Dbdict; 108 109 /** 110 * Sender(s) / Reciver(s) 111 */ 112 friend class NdbDictInterface; 113 114 /** 115 * For printing 116 */ 117 friend bool printCREATE_FILEGROUP_CONF(FILE*, const Uint32*, Uint32, Uint16); 118 119 STATIC_CONST( SignalLength = 6 ); 120 121 /* matches NdbDictionary.hpp */ 122 enum { 123 WarnUndobufferRoundUp = 0x1, 124 WarnExtentRoundUp = 0x4 125 }; 126 127 Uint32 senderData; 128 Uint32 senderRef; 129 Uint32 filegroupId; 130 Uint32 filegroupVersion; 131 Uint32 transId; 132 Uint32 warningFlags; 133 }; 134 135 struct CreateFileReq { 136 /** 137 * Sender(s) / Reciver(s) 138 */ 139 friend class NdbDictInterface; 140 friend class Dbdict; 141 friend class Tsman; 142 143 /** 144 * For printing 145 */ 146 friend bool printCREATE_FILE_REQ(FILE*, const Uint32*, Uint32, Uint16); 147 148 STATIC_CONST( SignalLength = 6 ); 149 150 union { 151 Uint32 senderData; 152 Uint32 clientData; 153 }; 154 union { 155 Uint32 senderRef; 156 Uint32 clientRef; 157 }; 158 Uint32 objType; 159 Uint32 requestInfo; 160 Uint32 transId; 161 Uint32 transKey; 162 163 enum RequstInfo 164 { 165 ForceCreateFile = 0x1 166 }; 167 168 SECTION( FILE_INFO = 0 ); 169 }; 170 171 struct CreateFileRef { 172 /** 173 * Sender(s) 174 */ 175 friend class Dbdict; 176 177 /** 178 * Sender(s) / Reciver(s) 179 */ 180 friend class NdbDictInterface; 181 182 /** 183 * For printing 184 */ 185 friend bool printCREATE_FILE_REF(FILE*, const Uint32*, Uint32, Uint16); 186 187 STATIC_CONST( SignalLength = 8 ); 188 189 enum ErrorCode { 190 NoError = 0, 191 Busy = 701, 192 NotMaster = 702, 193 NoMoreObjectRecords = 710, 194 InvalidFormat = 752, 195 NoSuchFilegroup = 753, 196 InvalidFilegroupVersion = 754, 197 FilenameAlreadyExists = 760, 198 OutOfFileRecords = 751, 199 InvalidFileType = 750, 200 NotSupportedWhenDiskless = 775, 201 SingleUser = 299, 202 FileSizeTooSmall = 1516 203 }; 204 205 Uint32 senderData; 206 Uint32 senderRef; 207 Uint32 masterNodeId; 208 Uint32 errorCode; 209 Uint32 errorLine; 210 Uint32 errorKey; 211 Uint32 status; 212 Uint32 errorNodeId; 213 Uint32 transId; 214 }; 215 216 struct CreateFileConf { 217 /** 218 * Sender(s) 219 */ 220 friend class Dbdict; 221 222 /** 223 * Sender(s) / Reciver(s) 224 */ 225 friend class Ndbcntr; 226 friend class NdbDictInterface; 227 228 /** 229 * For printing 230 */ 231 friend bool printCREATE_FILE_CONF(FILE*, const Uint32*, Uint32, Uint16); 232 233 STATIC_CONST( SignalLength = 6 ); 234 235 /* matches NdbDictionary.hpp */ 236 enum { 237 WarnUndofileRoundDown = 0x2, 238 WarnDatafileRoundDown = 0x8, 239 WarnDatafileRoundUp = 0x10 240 }; 241 242 Uint32 senderData; 243 Uint32 senderRef; 244 Uint32 fileId; 245 Uint32 fileVersion; 246 Uint32 transId; 247 Uint32 warningFlags; 248 }; 249 250 251 #undef JAM_FILE_ID 252 253 #endif 254