MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UtilPrepare.hpp
1 /*
2  Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
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 St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef UTIL_PREPARE_REQ_HPP
19 #define UTIL_PREPARE_REQ_HPP
20 
21 #include "SignalData.hpp"
22 #include <SimpleProperties.hpp>
23 
24 #ifdef NDB_WIN32
25 #ifdef NO_ERROR
26 #undef NO_ERROR
27 #endif
28 #endif
29 
45  friend class DbUtil;
46  friend class Trix;
47 
51  friend bool printUTIL_PREPARE_REQ(FILE * output,
52  const Uint32 * theData,
53  Uint32 len,
54  Uint16 receiverBlockNo);
55 
56 public:
57  enum OperationTypeValue {
58  Read = 0,
59  Update = 1,
60  Insert = 2,
61  Delete = 3,
62  Write = 4
63 
64  };
65 
66  enum KeyValue {
68  OperationType = 2,
69  TableName = 3,
71  TableId = 5,
72  AttributeId = 6,
73  ScanTakeOverInd = 7,
74  ReorgInd = 8
75  };
76 
77  // Signal constants
78  STATIC_CONST( SignalLength = 3 );
79  STATIC_CONST( PROPERTIES_SECTION = 0 );
80  STATIC_CONST( NoOfSections = 1 );
81 
82  GET_SET_SENDERREF
83  GET_SET_SENDERDATA
84 private:
85  Uint32 senderData; // MUST be no 1!
86  Uint32 senderRef;
87  Uint32 schemaTransId;
88 };
89 
101  friend class DbUtil;
102  friend class Trix;
103 
107  friend bool printUTIL_PREPARE_CONF(FILE * output,
108  const Uint32 * theData,
109  Uint32 len,
110  Uint16 receiverBlockNo);
111 
112 public:
113  STATIC_CONST( SignalLength = 2 );
114 
115  GET_SET_SENDERDATA
116  GET_SET_PREPAREID
117 private:
118  Uint32 senderData; // MUST be no 1!
119  Uint32 prepareId;
120 };
121 
122 
134  friend class Dbdict;
135  friend class DbUtil;
136  friend class Trix;
137 
141  friend bool printUTIL_PREPARE_REF(FILE * output,
142  const Uint32 * theData,
143  Uint32 len,
144  Uint16 receiverBlockNo);
145 
146 public:
147  enum ErrorCode {
148  NO_ERROR = 0,
149  PREPARE_SEIZE_ERROR = 1,
150  PREPARE_PAGES_SEIZE_ERROR = 2,
151  PREPARED_OPERATION_SEIZE_ERROR = 3,
152  DICT_TAB_INFO_ERROR = 4,
153  MISSING_PROPERTIES_SECTION = 5
154  };
155 
156  STATIC_CONST( SignalLength = 3 );
157 
158  GET_SET_SENDERDATA
159  GET_SET_ERRORCODE
160 private:
161  Uint32 senderData; // MUST be no 1!
162  Uint32 errorCode;
163  Uint32 dictErrCode; // If errorCode == DICT_TAB_INFO_ERROR
164 };
165 
166 
167 #endif