1 /* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
2 
3    This program is free software; you can redistribute it and/or modify
4    it under the terms of the GNU General Public License, version 2.0,
5    as published by the Free Software Foundation.
6 
7    This program is also distributed with certain software (including
8    but not limited to OpenSSL) that is licensed under separate terms,
9    as designated in a particular file or component or in included license
10    documentation.  The authors of MySQL hereby grant you an additional
11    permission to link the program and your derivative works with the
12    separately licensed software that they have included with MySQL.
13 
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License, version 2.0, for more details.
18 
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
22 
23 #ifndef DROP_NODEGROUP_IMPL_HPP
24 #define DROP_NODEGROUP_IMPL_HPP
25 
26 #include "SignalData.hpp"
27 
28 #define JAM_FILE_ID 158
29 
30 
31 struct DropNodegroupImplReq {
32   /**
33    * Sender(s) / Reciver(s)
34    */
35   friend class Dbdict;
36   friend class Tsman;
37   friend class Lgman;
38 
39   /**
40    * For printing
41    */
42   friend bool printDROP_NODEGROUP_IMPL_REQ(FILE*, const Uint32*, Uint32, Uint16);
43 
44   STATIC_CONST( SignalLength = 6 );
45 
46   enum {
47     RT_PARSE    = 0x1,
48     RT_PREPARE  = 0x2,
49     RT_ABORT    = 0x3,
50     RT_COMMIT   = 0x4,
51     RT_COMPLETE = 0x5
52   };
53 
54   Uint32 senderData;
55   Uint32 senderRef;
56 
57   Uint32 requestType;
58   Uint32 nodegroupId;
59 
60   Uint32 gci_hi;
61   Uint32 gci_lo;
62 };
63 
64 struct DropNodegroupImplRef {
65   /**
66    * Sender(s)
67    */
68   friend class Dbdict;
69   friend class Tsman;
70   friend class Lgman;
71 
72   /**
73    * For printing
74    */
75   friend bool printDROP_NODEGROUP_IMPL_REF(FILE*, const Uint32*, Uint32, Uint16);
76 
77   STATIC_CONST( SignalLength = 3 );
78 
79   enum ErrorCode {
80     NoError = 0,
81     NoSuchNodegroup = 767,
82     InvalidNodegroupVersion = 767,
83     NodegroupInUse = 768
84   };
85 
86   Uint32 senderData;
87   Uint32 senderRef;
88   Uint32 errorCode;
89 };
90 
91 struct DropNodegroupImplConf {
92   /**
93    * Sender(s)
94    */
95   friend class Dbdict;
96   friend class Tsman;
97   friend class Lgman;
98 
99   /**
100    * For printing
101    */
102   friend bool printDROP_NODEGROUP_IMPL_CONF(FILE*, const Uint32*, Uint32, Uint16);
103 
104   STATIC_CONST( SignalLength = 4 );
105 
106   Uint32 senderData;
107   Uint32 senderRef;
108   Uint32 gci_hi;
109   Uint32 gci_lo;
110 };
111 
112 
113 #undef JAM_FILE_ID
114 
115 #endif
116