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

« back to all changes in this revision

Viewing changes to storage/ndb/include/kernel/signaldata/WaitGCP.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 WAIT_GCP_HPP
 
17
#define WAIT_GCP_HPP
 
18
 
 
19
/**
 
20
 * This signal is sent by anyone to local DIH
 
21
 *
 
22
 * If local DIH is not master, it forwards it to master DIH
 
23
 *   and start acting as a proxy
 
24
 *
 
25
 */
 
26
class WaitGCPReq {
 
27
  
 
28
  /**
 
29
   * Sender(s) / Reciver(s)
 
30
   */
 
31
  friend class Dbdih;
 
32
  
 
33
  /**
 
34
   * Sender
 
35
   */
 
36
  friend class Ndbcntr;
 
37
  friend class Dbdict;
 
38
  friend class Backup;
 
39
  //friend class Grep::PSCoord;
 
40
 
 
41
public:
 
42
  STATIC_CONST( SignalLength = 3 );
 
43
public:
 
44
  enum RequestType {
 
45
    Complete = 1,           ///< Wait for a GCP to complete
 
46
    CompleteForceStart = 2, ///< Wait for a GCP to complete start one if needed
 
47
    CompleteIfRunning = 3,  ///< Wait for ongoing GCP
 
48
    CurrentGCI        = 8,  ///< Immediately return current GCI
 
49
    BlockStartGcp     = 9,
 
50
    UnblockStartGcp   = 10
 
51
  };
 
52
 
 
53
  Uint32 senderRef;
 
54
  Uint32 senderData;
 
55
  Uint32 requestType;
 
56
};
 
57
 
 
58
class WaitGCPConf {
 
59
 
 
60
  /**
 
61
   * Sender(s) / Reciver(s)
 
62
   */
 
63
  friend class Dbdih;
 
64
  
 
65
  /**
 
66
   * Reciver(s)
 
67
   */
 
68
  friend class Ndbcntr;
 
69
  friend class Dbdict;
 
70
  friend class Backup;
 
71
  //friend class Grep::PSCoord;
 
72
 
 
73
public:
 
74
  STATIC_CONST( SignalLength = 3 );
 
75
  
 
76
public:
 
77
  Uint32 senderData;
 
78
  Uint32 gcp;
 
79
  Uint32 blockStatus;
 
80
};
 
81
 
 
82
class WaitGCPRef {
 
83
  
 
84
  /**
 
85
   * Sender(s) / Reciver(s)
 
86
   */
 
87
  friend class Dbdih;
 
88
  
 
89
  /**
 
90
   * Reciver(s)
 
91
   */
 
92
  friend class Ndbcntr;
 
93
  friend class Dbdict;
 
94
  friend class Backup;
 
95
  friend class Grep;
 
96
 
 
97
public:
 
98
  STATIC_CONST( SignalLength = 2 );
 
99
 
 
100
  enum ErrorCode {
 
101
    StopOK = 0,
 
102
    NF_CausedAbortOfProcedure = 1,
 
103
    NoWaitGCPRecords = 2
 
104
  };
 
105
  
 
106
private:
 
107
  Uint32 errorCode;
 
108
  Uint32 senderData;
 
109
};
 
110
 
 
111
#endif