1
/* Copyright (C) 2003 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
#ifndef UTIL_EXECUTE_HPP
17
#define UTIL_EXECUTE_HPP
19
#include "SignalData.hpp"
20
#include <SimpleProperties.hpp>
23
* UTIL_EXECUTE_REQ, UTIL_EXECUTE_CONF, UTIL_EXECUTE_REF
27
* @class UtilExecuteReq
28
* @brief Execute transaction in Util block
31
* - UTIL_EXECUTE_REQ <prepareId> <ListOfAttributeHeaderValuePairs>
34
class UtilExecuteReq {
35
/** Sender(s) / Receiver(s) */
40
friend bool printUTIL_EXECUTE_REQ(FILE * output, const Uint32 * theData,
41
Uint32 len, Uint16 receiverBlockNo);
43
STATIC_CONST( SignalLength = 3 );
44
STATIC_CONST( HEADER_SECTION = 0 );
45
STATIC_CONST( DATA_SECTION = 1 );
46
STATIC_CONST( NoOfSections = 2 );
50
void setPrepareId(Uint32 pId) { prepareId = pId; }; // !! unsets release flag
51
Uint32 getPrepareId() const { return prepareId & 0xFF; };
52
void setReleaseFlag() { prepareId |= 0x100; };
53
bool getReleaseFlag() const { return (prepareId & 0x100) != 0; };
55
Uint32 senderData; // MUST be no 1!
57
Uint32 prepareId; // Which prepared transaction to execute
61
* @class UtilExecuteConf
64
* - UTIL_PREPARE_CONF <UtilPrepareId>
67
class UtilExecuteConf {
69
* Sender(s) / Receiver(s)
77
friend bool printUTIL_EXECUTE_CONF(FILE * output,
78
const Uint32 * theData,
80
Uint16 receiverBlockNo);
82
STATIC_CONST( SignalLength = 1 );
86
Uint32 senderData; // MUST be no 1!
91
* @class UtilExecuteRef
97
class UtilExecuteRef {
99
* Sender(s) / Receiver(s)
107
friend bool printUTIL_EXECUTE_REF(FILE * output,
108
const Uint32 * theData,
110
Uint16 receiverBlockNo);
113
STATIC_CONST( SignalLength = 3 );
116
IllegalKeyNumber = 1,
117
IllegalAttrNumber = 2,
120
MissingDataSection = 6,
128
Uint32 senderData; // MUST be no 1!