MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UtilExecute.hpp
1 /*
2  Copyright (C) 2003, 2005, 2006, 2008 MySQL AB, 2008 Sun Microsystems, Inc.
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 as published by
7  the Free Software Foundation; version 2 of the License.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #ifndef UTIL_EXECUTE_HPP
20 #define UTIL_EXECUTE_HPP
21 
22 #include "SignalData.hpp"
23 #include <SimpleProperties.hpp>
24 
39  friend class DbUtil;
40  friend class Trix;
41 
43  friend bool printUTIL_EXECUTE_REQ(FILE * output, const Uint32 * theData,
44  Uint32 len, Uint16 receiverBlockNo);
45 public:
46  STATIC_CONST( SignalLength = 4 );
47  STATIC_CONST( HEADER_SECTION = 0 );
48  STATIC_CONST( DATA_SECTION = 1 );
49  STATIC_CONST( NoOfSections = 2 );
50 
51  GET_SET_SENDERREF
52  GET_SET_SENDERDATA
53  void setPrepareId(Uint32 pId) { prepareId = pId; }; // !! unsets release flag
54  Uint32 getPrepareId() const { return prepareId & 0xFF; };
55  void setReleaseFlag() { prepareId |= 0x100; };
56  bool getReleaseFlag() const { return (prepareId & 0x100) != 0; };
57 
58  Uint32 senderData; // MUST be no 1!
59  Uint32 senderRef;
60  Uint32 prepareId; // Which prepared transaction to execute
61  Uint32 scanTakeOver;
62 };
63 
75  friend class DbUtil;
76  friend class Trix;
77 
81  friend bool printUTIL_EXECUTE_CONF(FILE * output,
82  const Uint32 * theData,
83  Uint32 len,
84  Uint16 receiverBlockNo);
85 public:
86  STATIC_CONST( SignalLength = 3 );
87 
88  GET_SET_SENDERDATA
89 private:
90  Uint32 senderData; // MUST be no 1!
91  Uint32 gci_hi;
92  Uint32 gci_lo;
93 };
94 
95 
107  friend class DbUtil;
108  friend class Trix;
109 
113  friend bool printUTIL_EXECUTE_REF(FILE * output,
114  const Uint32 * theData,
115  Uint32 len,
116  Uint16 receiverBlockNo);
117 
118 public:
119  STATIC_CONST( SignalLength = 3 );
120 
121  enum ErrorCode {
122  IllegalKeyNumber = 1,
123  IllegalAttrNumber = 2,
124  TCError = 3,
125  AllocationError = 5,
126  MissingDataSection = 6,
127  MissingData = 7
128  };
129 
130  GET_SET_SENDERDATA
131  GET_SET_ERRORCODE
132  GET_SET_TCERRORCODE
133 private:
134  Uint32 senderData; // MUST be no 1!
135  Uint32 errorCode;
136  Uint32 TCErrorCode;
137 };
138 
139 
140 #endif