1 /*
2    Copyright (C) 2005-2008 MySQL AB
3     All rights reserved. Use is subject to license terms.
4 
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License, version 2.0,
7    as published by the Free Software Foundation.
8 
9    This program is also distributed with certain software (including
10    but not limited to OpenSSL) that is licensed under separate terms,
11    as designated in a particular file or component or in included license
12    documentation.  The authors of MySQL hereby grant you an additional
13    permission to link the program and your derivative works with the
14    separately licensed software that they have included with MySQL.
15 
16    This program is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19    GNU General Public License, version 2.0, for more details.
20 
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
24 */
25 
26 #ifndef DROP_FILEGROUP_HPP
27 #define DROP_FILEGROUP_HPP
28 
29 #include "SignalData.hpp"
30 
31 struct DropFilegroupReq {
32   /**
33    * Sender(s) / Reciver(s)
34    */
35   friend class NdbDictInterface;
36   friend class Dbdict;
37   friend class Tsman;
38 
39   /**
40    * For printing
41    */
42   friend bool printDROP_FILEGROUP_REQ(FILE*, const Uint32*, Uint32, Uint16);
43 
44   STATIC_CONST( SignalLength = 7 );
45   STATIC_CONST( GSN = GSN_DROP_FILEGROUP_REQ );
46 
47   union {
48     Uint32 senderData;
49     Uint32 clientData;
50   };
51   union {
52     Uint32 senderRef;
53     Uint32 clientRef;
54   };
55   Uint32 filegroup_id;
56   Uint32 filegroup_version;
57   Uint32 requestInfo;
58   Uint32 transKey;
59   Uint32 transId;
60 };
61 
62 struct DropFilegroupRef {
63   /**
64    * Sender(s)
65    */
66   friend class Dbdict;
67 
68   /**
69    * Sender(s) / Reciver(s)
70    */
71   friend class Ndbcntr;
72   friend class NdbDictInterface;
73 
74   /**
75    * For printing
76    */
77   friend bool printDROP_FILEGROUP_REF(FILE*, const Uint32*, Uint32, Uint16);
78 
79   STATIC_CONST( SignalLength = 9 );
80   STATIC_CONST( GSN = GSN_DROP_FILEGROUP_REF );
81 
82   enum ErrorCode {
83     NoError = 0,
84     Busy = 701,
85     NotMaster = 702,
86     NoSuchFilegroup = 767,
87     FilegroupInUse = 768,
88     InvalidSchemaObjectVersion = 774,
89     SingleUser = 299
90   };
91 
92   Uint32 senderData;
93   Uint32 senderRef;
94   Uint32 masterNodeId;
95   Uint32 errorCode;
96   Uint32 errorLine;
97   Uint32 errorKey;
98   Uint32 errorNodeId;
99   Uint32 transId;
100 };
101 
102 struct DropFilegroupConf {
103   /**
104    * Sender(s)
105    */
106   friend class Dbdict;
107 
108   /**
109    * Sender(s) / Reciver(s)
110    */
111   friend class Ndbcntr;
112   friend class NdbDictInterface;
113 
114   /**
115    * For printing
116    */
117   friend bool printDROP_FILEGROUP_CONF(FILE*, const Uint32*, Uint32, Uint16);
118 
119   STATIC_CONST( SignalLength = 5 );
120   STATIC_CONST( GSN = GSN_DROP_FILEGROUP_CONF );
121 
122   Uint32 senderData;
123   Uint32 senderRef;
124   Uint32 filegroupId;
125   Uint32 filegroupVersion;
126   Uint32 transId;
127 };
128 
129 struct DropFileReq {
130   /**
131    * Sender(s) / Reciver(s)
132    */
133   friend class NdbDictInterface;
134   friend class Dbdict;
135   friend class Tsman;
136 
137   /**
138    * For printing
139    */
140   friend bool printDROP_FILE_REQ(FILE*, const Uint32*, Uint32, Uint16);
141 
142   STATIC_CONST( SignalLength = 7 );
143   STATIC_CONST( GSN = GSN_DROP_FILE_REQ );
144 
145   union {
146     Uint32 senderData;
147     Uint32 clientData;
148   };
149   union {
150     Uint32 senderRef;
151     Uint32 clientRef;
152   };
153   Uint32 file_id;
154   Uint32 file_version;
155   Uint32 requestInfo;
156   Uint32 transKey;
157   Uint32 transId;
158 };
159 
160 struct DropFileRef {
161   /**
162    * Sender(s)
163    */
164   friend class Dbdict;
165 
166   /**
167    * Sender(s) / Reciver(s)
168    */
169   friend class Ndbcntr;
170   friend class NdbDictInterface;
171 
172   /**
173    * For printing
174    */
175   friend bool printDROP_FILE_REF(FILE*, const Uint32*, Uint32, Uint16);
176 
177   STATIC_CONST( SignalLength = 9 );
178   STATIC_CONST( GSN = GSN_DROP_FILE_REF );
179 
180   enum ErrorCode {
181     NoError = 0,
182     Busy = 701,
183     NotMaster = 702,
184     NoSuchFile = 766,
185     DropUndoFileNotSupported = 769,
186     InvalidSchemaObjectVersion = 774,
187     SingleUser = 299
188   };
189 
190   Uint32 senderData;
191   Uint32 senderRef;
192   Uint32 masterNodeId;
193   Uint32 errorCode;
194   Uint32 errorLine;
195   Uint32 errorKey;
196   Uint32 errorNodeId;
197   Uint32 transId;
198 };
199 
200 struct DropFileConf {
201   /**
202    * Sender(s)
203    */
204   friend class Dbdict;
205 
206   /**
207    * Sender(s) / Reciver(s)
208    */
209   friend class Ndbcntr;
210   friend class NdbDictInterface;
211 
212   /**
213    * For printing
214    */
215   friend bool printDROP_FILE_CONF(FILE*, const Uint32*, Uint32, Uint16);
216 
217   STATIC_CONST( SignalLength = 5 );
218   STATIC_CONST( GSN = GSN_DROP_FILE_CONF );
219 
220   Uint32 senderData;
221   Uint32 senderRef;
222   Uint32 fileId;
223   Uint32 fileVersion;
224   Uint32 transId;
225 };
226 
227 #endif
228