1 /* Copyright (c) 2003-2005 MySQL AB 2 Use is subject to license terms 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 as published by 6 the Free Software Foundation; version 2 of the License. 7 8 This program is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 GNU General Public License for more details. 12 13 You should have received a copy of the GNU General Public License 14 along with this program; if not, write to the Free Software 15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ 16 17 #ifndef PREP_DROP_TAB_HPP 18 #define PREP_DROP_TAB_HPP 19 20 #include "SignalData.hpp" 21 22 class PrepDropTabReq { 23 /** 24 * Sender(s) 25 */ 26 friend class Dbdict; 27 28 /** 29 * Receiver(s) 30 */ 31 friend class Dbtc; 32 friend class Dblqh; 33 friend class Dbdih; 34 35 friend bool printPREP_DROP_TAB_REQ(FILE *, const Uint32 *, Uint32, Uint16); 36 public: 37 STATIC_CONST( SignalLength = 4 ); 38 39 private: 40 Uint32 senderRef; 41 Uint32 senderData; 42 Uint32 tableId; 43 Uint32 requestType; // @see DropTabReq::RequestType 44 }; 45 46 class PrepDropTabConf { 47 /** 48 * Sender(s) 49 */ 50 friend class Dbtc; 51 friend class Dblqh; 52 friend class Dbdih; 53 54 /** 55 * Receiver(s) 56 */ 57 friend class Dbdict; 58 59 friend bool printPREP_DROP_TAB_CONF(FILE *, const Uint32 *, Uint32, Uint16); 60 public: 61 STATIC_CONST( SignalLength = 3 ); 62 63 private: 64 Uint32 senderRef; 65 Uint32 senderData; 66 Uint32 tableId; 67 }; 68 69 class PrepDropTabRef { 70 /** 71 * Sender(s) 72 */ 73 friend class Dbtc; 74 friend class Dblqh; 75 friend class Dbdih; 76 77 /** 78 * Receiver(s) 79 */ 80 friend class Dbdict; 81 82 friend bool printPREP_DROP_TAB_REF(FILE *, const Uint32 *, Uint32, Uint16); 83 public: 84 STATIC_CONST( SignalLength = 4 ); 85 86 enum ErrorCode { 87 OK = 0, 88 NoSuchTable = 1, 89 PrepDropInProgress = 2, 90 DropInProgress = 3, 91 InvalidTableState = 4, 92 NF_FakeErrorREF = 5 93 }; 94 95 private: 96 Uint32 senderRef; 97 Uint32 senderData; 98 Uint32 tableId; 99 Uint32 errorCode; 100 }; 101 102 class WaitDropTabReq { 103 /** 104 * Sender 105 */ 106 friend class Dbtc; 107 friend class Dbdih; 108 109 /** 110 * Receiver(s) 111 */ 112 friend class Dblqh; 113 114 friend bool printWAIT_DROP_TAB_REQ(FILE *, const Uint32 *, Uint32, Uint16); 115 public: 116 STATIC_CONST( SignalLength = 2 ); 117 118 Uint32 tableId; 119 Uint32 senderRef; 120 }; 121 122 class WaitDropTabRef { 123 /** 124 * Sender 125 */ 126 friend class Dblqh; 127 128 /** 129 * Receiver(s) 130 */ 131 friend class Dbtc; 132 friend class Dbdih; 133 134 friend bool printWAIT_DROP_TAB_REF(FILE *, const Uint32 *, Uint32, Uint16); 135 public: 136 STATIC_CONST( SignalLength = 4 ); 137 138 enum ErrorCode { 139 NoSuchTable = 1, 140 IllegalTableState = 2, 141 DropInProgress = 3, 142 NF_FakeErrorREF = 4 143 }; 144 145 Uint32 tableId; 146 Uint32 senderRef; 147 Uint32 errorCode; 148 Uint32 tableStatus; 149 }; 150 151 152 class WaitDropTabConf { 153 /** 154 * Sender 155 */ 156 friend class Dblqh; 157 158 /** 159 * Receiver(s) 160 */ 161 friend class Dbtc; 162 friend class Dbdih; 163 164 friend bool printWAIT_DROP_TAB_CONF(FILE *, const Uint32 *, Uint32, Uint16); 165 public: 166 STATIC_CONST( SignalLength = 2 ); 167 168 Uint32 tableId; 169 Uint32 senderRef; 170 }; 171 172 #endif 173