~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ndb/include/kernel/signaldata/PrepDropTab.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
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.
 
6
 
 
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.
 
11
 
 
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 */
 
15
 
 
16
#ifndef PREP_DROP_TAB_HPP
 
17
#define PREP_DROP_TAB_HPP
 
18
 
 
19
#include "SignalData.hpp"
 
20
 
 
21
class PrepDropTabReq {
 
22
  /**
 
23
   * Sender(s)
 
24
   */
 
25
  friend class Dbdict;
 
26
 
 
27
  /**
 
28
   * Receiver(s)
 
29
   */
 
30
  friend class Dbtc;
 
31
  friend class Dblqh;
 
32
  friend class Dbdih;
 
33
 
 
34
  friend bool printPREP_DROP_TAB_REQ(FILE *, const Uint32 *, Uint32, Uint16);
 
35
public:
 
36
  STATIC_CONST( SignalLength = 4 );
 
37
 
 
38
private:
 
39
  Uint32 senderRef;
 
40
  Uint32 senderData;
 
41
  Uint32 tableId;
 
42
  Uint32 requestType; // @see DropTabReq::RequestType
 
43
};
 
44
 
 
45
class PrepDropTabConf {
 
46
  /**
 
47
   * Sender(s)
 
48
   */
 
49
  friend class Dbtc;
 
50
  friend class Dblqh;
 
51
  friend class Dbdih;
 
52
 
 
53
  /**
 
54
   * Receiver(s)
 
55
   */
 
56
  friend class Dbdict;
 
57
 
 
58
  friend bool printPREP_DROP_TAB_CONF(FILE *, const Uint32 *, Uint32, Uint16);
 
59
public:
 
60
  STATIC_CONST( SignalLength = 3 );
 
61
 
 
62
private:
 
63
  Uint32 senderRef;
 
64
  Uint32 senderData;
 
65
  Uint32 tableId;
 
66
};
 
67
 
 
68
class PrepDropTabRef {
 
69
  /**
 
70
   * Sender(s)
 
71
   */
 
72
  friend class Dbtc;
 
73
  friend class Dblqh;
 
74
  friend class Dbdih;
 
75
 
 
76
  /**
 
77
   * Receiver(s)
 
78
   */
 
79
  friend class Dbdict;
 
80
 
 
81
  friend bool printPREP_DROP_TAB_REF(FILE *, const Uint32 *, Uint32, Uint16);
 
82
public:
 
83
  STATIC_CONST( SignalLength = 4 );
 
84
 
 
85
  enum ErrorCode {
 
86
    OK = 0,
 
87
    NoSuchTable = 1,
 
88
    PrepDropInProgress = 2,
 
89
    DropInProgress = 3,
 
90
    InvalidTableState = 4,
 
91
    NF_FakeErrorREF = 5
 
92
  };
 
93
  
 
94
private:
 
95
  Uint32 senderRef;
 
96
  Uint32 senderData;
 
97
  Uint32 tableId;
 
98
  Uint32 errorCode;
 
99
};
 
100
 
 
101
class WaitDropTabReq {
 
102
  /**
 
103
   * Sender
 
104
   */
 
105
  friend class Dbtc;
 
106
  friend class Dbdih;
 
107
 
 
108
  /**
 
109
   * Receiver(s)
 
110
   */
 
111
  friend class Dblqh;
 
112
 
 
113
  friend bool printWAIT_DROP_TAB_REQ(FILE *, const Uint32 *, Uint32, Uint16);
 
114
public:
 
115
  STATIC_CONST( SignalLength = 2 );
 
116
  
 
117
  Uint32 tableId;
 
118
  Uint32 senderRef;
 
119
};
 
120
 
 
121
class WaitDropTabRef {
 
122
  /**
 
123
   * Sender
 
124
   */
 
125
  friend class Dblqh;
 
126
 
 
127
  /**
 
128
   * Receiver(s)
 
129
   */
 
130
  friend class Dbtc;
 
131
  friend class Dbdih;
 
132
 
 
133
  friend bool printWAIT_DROP_TAB_REF(FILE *, const Uint32 *, Uint32, Uint16);
 
134
public:
 
135
  STATIC_CONST( SignalLength = 4 );
 
136
  
 
137
  enum ErrorCode {
 
138
    NoSuchTable = 1,
 
139
    IllegalTableState = 2,
 
140
    DropInProgress = 3,
 
141
    NF_FakeErrorREF = 4
 
142
  };
 
143
  
 
144
  Uint32 tableId;
 
145
  Uint32 senderRef;
 
146
  Uint32 errorCode;
 
147
  Uint32 tableStatus;
 
148
};
 
149
 
 
150
 
 
151
class WaitDropTabConf {
 
152
  /**
 
153
   * Sender
 
154
   */
 
155
  friend class Dblqh;
 
156
 
 
157
  /**
 
158
   * Receiver(s)
 
159
   */
 
160
  friend class Dbtc;
 
161
  friend class Dbdih;
 
162
 
 
163
  friend bool printWAIT_DROP_TAB_CONF(FILE *, const Uint32 *, Uint32, Uint16);
 
164
public:
 
165
  STATIC_CONST( SignalLength = 2 );
 
166
 
 
167
  Uint32 tableId;
 
168
  Uint32 senderRef;
 
169
};
 
170
 
 
171
#endif