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 */
20
#include <SimulatedBlock.hpp>
21
#include <LogLevel.hpp>
28
class Cmvmi : public SimulatedBlock {
30
Cmvmi(Block_context&);
35
* These methods used to be reportXXX
37
* But they in a nasty way intefere with the execution model
38
* they been turned in to exec-Method used via prio A signals
40
void execDISCONNECT_REP(Signal*);
41
void execCONNECT_REP(Signal*);
46
// The signal processing functions
47
void execNDB_TAMPER(Signal* signal);
48
void execSET_LOGLEVELORD(Signal* signal);
49
void execEVENT_REP(Signal* signal);
50
void execREAD_CONFIG_REQ(Signal* signal);
51
void execSTTOR(Signal* signal);
52
void execCLOSE_COMREQ(Signal* signal);
53
void execENABLE_COMORD(Signal* signal);
54
void execOPEN_COMREQ(Signal* signal);
55
void execSIZEALT_ACK(Signal* signal);
56
void execTEST_ORD(Signal* signal);
58
void execSTOP_ORD(Signal* signal);
59
void execSTART_ORD(Signal* signal);
60
void execTAMPER_ORD(Signal* signal);
62
void execDUMP_STATE_ORD(Signal* signal);
64
void execEVENT_SUBSCRIBE_REQ(Signal *);
65
void cancelSubscription(NodeId nodeId);
67
void execTESTSIG(Signal* signal);
68
void execNODE_START_REP(Signal* signal);
70
char theErrorMessage[256];
71
void sendSTTORRY(Signal* signal);
74
NdbNodeBitmask c_dbNodes;
77
* This struct defines the data needed for a EVENT_REP subscriber
79
struct EventRepSubscriber {
81
* What log level is the subscriber using
86
* What block reference does he use
87
* (Where should the EVENT_REP's be forwarded)
89
BlockReference blockRef;
92
* Next ptr (used in pool/list)
94
union { Uint32 nextPool; Uint32 nextList; };
97
typedef Ptr<EventRepSubscriber> SubscriberPtr;
100
* Pool of EventRepSubscriber record
102
ArrayPool<EventRepSubscriber> subscriberPool;
105
* List of current subscribers
107
DLList<EventRepSubscriber> subscribers;
110
// Declared but not defined
111
Cmvmi(const Cmvmi &obj);
112
void operator = (const Cmvmi &);
114
void sendFragmentedComplete(Signal* signal, Uint32 data, Uint32 returnCode);