1 /*
2    Copyright (c) 2003, 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 PREP_DROP_TAB_HPP
26 #define PREP_DROP_TAB_HPP
27 
28 #include "SignalData.hpp"
29 
30 #define JAM_FILE_ID 161
31 
32 
33 class PrepDropTabReq {
34   /**
35    * Sender(s)
36    */
37   friend class Dbdict;
38 
39   /**
40    * Receiver(s)
41    */
42   friend class Dbspj;
43   friend class Dbtc;
44   friend class Dblqh;
45   friend class DblqhProxy;
46   friend class Dbdih;
47   friend class DbgdmProxy;
48 
49   friend bool printPREP_DROP_TAB_REQ(FILE *, const Uint32 *, Uint32, Uint16);
50 public:
51   STATIC_CONST( SignalLength = 4 );
52 
53 private:
54   Uint32 senderRef;
55   Uint32 senderData;
56   Uint32 tableId;
57   Uint32 requestType; // @see DropTabReq::RequestType
58 };
59 
60 class PrepDropTabConf {
61   /**
62    * Sender(s)
63    */
64   friend class Dbspj;
65   friend class Dbtc;
66   friend class Dblqh;
67   friend class DblqhProxy;
68   friend class Dbdih;
69   friend class DbgdmProxy;
70 
71   /**
72    * Receiver(s)
73    */
74   friend class Dbdict;
75 
76   friend bool printPREP_DROP_TAB_CONF(FILE *, const Uint32 *, Uint32, Uint16);
77 public:
78   STATIC_CONST( SignalLength = 3 );
79 
80 private:
81   Uint32 senderRef;
82   Uint32 senderData;
83   Uint32 tableId;
84 };
85 
86 class PrepDropTabRef {
87   /**
88    * Sender(s)
89    */
90   friend class Dbspj;
91   friend class Dbtc;
92   friend class Dblqh;
93   friend class DblqhProxy;
94   friend class Dbdih;
95   friend class DbgdmProxy;
96 
97   /**
98    * Receiver(s)
99    */
100   friend class Dbdict;
101 
102   friend bool printPREP_DROP_TAB_REF(FILE *, const Uint32 *, Uint32, Uint16);
103 public:
104   STATIC_CONST( SignalLength = 4 );
105 
106   enum ErrorCode {
107     OK = 0,
108     NoSuchTable = 1,
109     PrepDropInProgress = 2,
110     DropInProgress = 3,
111     InvalidTableState = 4,
112     NF_FakeErrorREF = 5
113   };
114 
115 private:
116   Uint32 senderRef;
117   Uint32 senderData;
118   Uint32 tableId;
119   Uint32 errorCode;
120 };
121 
122 
123 #undef JAM_FILE_ID
124 
125 #endif
126