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 DROP_FILEGROUP_HPP
26 #define DROP_FILEGROUP_HPP
27 
28 #include "SignalData.hpp"
29 
30 #define JAM_FILE_ID 135
31 
32 
33 struct DropFilegroupReq {
34   /**
35    * Sender(s) / Reciver(s)
36    */
37   friend class NdbDictInterface;
38   friend class Dbdict;
39   friend class Tsman;
40 
41   /**
42    * For printing
43    */
44   friend bool printDROP_FILEGROUP_REQ(FILE*, const Uint32*, Uint32, Uint16);
45 
46   STATIC_CONST( SignalLength = 7 );
47   STATIC_CONST( GSN = GSN_DROP_FILEGROUP_REQ );
48 
49   union {
50     Uint32 senderData;
51     Uint32 clientData;
52   };
53   union {
54     Uint32 senderRef;
55     Uint32 clientRef;
56   };
57   Uint32 filegroup_id;
58   Uint32 filegroup_version;
59   Uint32 requestInfo;
60   Uint32 transKey;
61   Uint32 transId;
62 };
63 
64 struct DropFilegroupRef {
65   /**
66    * Sender(s)
67    */
68   friend class Dbdict;
69 
70   /**
71    * Sender(s) / Reciver(s)
72    */
73   friend class Ndbcntr;
74   friend class NdbDictInterface;
75 
76   /**
77    * For printing
78    */
79   friend bool printDROP_FILEGROUP_REF(FILE*, const Uint32*, Uint32, Uint16);
80 
81   STATIC_CONST( SignalLength = 9 );
82   STATIC_CONST( GSN = GSN_DROP_FILEGROUP_REF );
83 
84   enum ErrorCode {
85     NoError = 0,
86     Busy = 701,
87     NotMaster = 702,
88     NoSuchFilegroup = 767,
89     FilegroupInUse = 768,
90     InvalidSchemaObjectVersion = 774,
91     SingleUser = 299
92   };
93 
94   Uint32 senderData;
95   Uint32 senderRef;
96   Uint32 masterNodeId;
97   Uint32 errorCode;
98   Uint32 errorLine;
99   Uint32 errorKey;
100   Uint32 errorNodeId;
101   Uint32 transId;
102 };
103 
104 struct DropFilegroupConf {
105   /**
106    * Sender(s)
107    */
108   friend class Dbdict;
109 
110   /**
111    * Sender(s) / Reciver(s)
112    */
113   friend class Ndbcntr;
114   friend class NdbDictInterface;
115 
116   /**
117    * For printing
118    */
119   friend bool printDROP_FILEGROUP_CONF(FILE*, const Uint32*, Uint32, Uint16);
120 
121   STATIC_CONST( SignalLength = 5 );
122   STATIC_CONST( GSN = GSN_DROP_FILEGROUP_CONF );
123 
124   Uint32 senderData;
125   Uint32 senderRef;
126   Uint32 filegroupId;
127   Uint32 filegroupVersion;
128   Uint32 transId;
129 };
130 
131 struct DropFileReq {
132   /**
133    * Sender(s) / Reciver(s)
134    */
135   friend class NdbDictInterface;
136   friend class Dbdict;
137   friend class Tsman;
138 
139   /**
140    * For printing
141    */
142   friend bool printDROP_FILE_REQ(FILE*, const Uint32*, Uint32, Uint16);
143 
144   STATIC_CONST( SignalLength = 7 );
145   STATIC_CONST( GSN = GSN_DROP_FILE_REQ );
146 
147   union {
148     Uint32 senderData;
149     Uint32 clientData;
150   };
151   union {
152     Uint32 senderRef;
153     Uint32 clientRef;
154   };
155   Uint32 file_id;
156   Uint32 file_version;
157   Uint32 requestInfo;
158   Uint32 transKey;
159   Uint32 transId;
160 };
161 
162 struct DropFileRef {
163   /**
164    * Sender(s)
165    */
166   friend class Dbdict;
167 
168   /**
169    * Sender(s) / Reciver(s)
170    */
171   friend class Ndbcntr;
172   friend class NdbDictInterface;
173 
174   /**
175    * For printing
176    */
177   friend bool printDROP_FILE_REF(FILE*, const Uint32*, Uint32, Uint16);
178 
179   STATIC_CONST( SignalLength = 9 );
180   STATIC_CONST( GSN = GSN_DROP_FILE_REF );
181 
182   enum ErrorCode {
183     NoError = 0,
184     Busy = 701,
185     NotMaster = 702,
186     NoSuchFile = 766,
187     DropUndoFileNotSupported = 769,
188     InvalidSchemaObjectVersion = 774,
189     SingleUser = 299
190   };
191 
192   Uint32 senderData;
193   Uint32 senderRef;
194   Uint32 masterNodeId;
195   Uint32 errorCode;
196   Uint32 errorLine;
197   Uint32 errorKey;
198   Uint32 errorNodeId;
199   Uint32 transId;
200 };
201 
202 struct DropFileConf {
203   /**
204    * Sender(s)
205    */
206   friend class Dbdict;
207 
208   /**
209    * Sender(s) / Reciver(s)
210    */
211   friend class Ndbcntr;
212   friend class NdbDictInterface;
213 
214   /**
215    * For printing
216    */
217   friend bool printDROP_FILE_CONF(FILE*, const Uint32*, Uint32, Uint16);
218 
219   STATIC_CONST( SignalLength = 5 );
220   STATIC_CONST( GSN = GSN_DROP_FILE_CONF );
221 
222   Uint32 senderData;
223   Uint32 senderRef;
224   Uint32 fileId;
225   Uint32 fileVersion;
226   Uint32 transId;
227 };
228 
229 
230 #undef JAM_FILE_ID
231 
232 #endif
233