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

« back to all changes in this revision

Viewing changes to storage/ndb/include/kernel/signaldata/CopyFrag.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 COPY_FRAG_HPP
 
17
#define COPY_FRAG_HPP
 
18
 
 
19
#include "SignalData.hpp"
 
20
 
 
21
class CopyFragReq {
 
22
  /**
 
23
   * Sender(s)
 
24
   */
 
25
  friend class Dbdih;
 
26
 
 
27
  /**
 
28
   * Receiver(s)
 
29
   */
 
30
  friend class Dblqh;
 
31
public:
 
32
  STATIC_CONST( SignalLength = 10 );
 
33
 
 
34
private:
 
35
  Uint32 userPtr;
 
36
  Uint32 userRef;
 
37
  Uint32 tableId;
 
38
  Uint32 fragId;
 
39
  Uint32 nodeId;
 
40
  Uint32 schemaVersion;
 
41
  Uint32 distributionKey;
 
42
  Uint32 gci;
 
43
  Uint32 nodeCount;
 
44
  Uint32 nodeList[1];
 
45
  //Uint32 maxPage; is stored in nodeList[nodeCount]
 
46
};
 
47
 
 
48
class CopyFragConf {
 
49
  /**
 
50
   * Sender(s)
 
51
   */
 
52
  friend class Dblqh;
 
53
 
 
54
  /**
 
55
   * Receiver(s)
 
56
   */
 
57
  friend class Dbdih;
 
58
public:
 
59
  STATIC_CONST( SignalLength = 5 );
 
60
 
 
61
private:
 
62
  Uint32 userPtr;
 
63
  Uint32 sendingNodeId;
 
64
  Uint32 startingNodeId;
 
65
  Uint32 tableId;
 
66
  Uint32 fragId;
 
67
};
 
68
class CopyFragRef {
 
69
  /**
 
70
   * Sender(s)
 
71
   */
 
72
  friend class Dblqh;
 
73
 
 
74
  /**
 
75
   * Receiver(s)
 
76
   */
 
77
  friend class Dbdih;
 
78
public:
 
79
  STATIC_CONST( SignalLength = 6 );
 
80
 
 
81
private:
 
82
  Uint32 userPtr;
 
83
  Uint32 sendingNodeId;
 
84
  Uint32 startingNodeId;
 
85
  Uint32 tableId;
 
86
  Uint32 fragId;
 
87
  Uint32 errorCode;
 
88
};
 
89
 
 
90
struct UpdateFragDistKeyOrd
 
91
{
 
92
  Uint32 tableId;
 
93
  Uint32 fragId;
 
94
  Uint32 fragDistributionKey;
 
95
 
 
96
  STATIC_CONST( SignalLength = 3 );
 
97
};
 
98
 
 
99
struct PrepareCopyFragReq
 
100
{
 
101
  STATIC_CONST( SignalLength = 6 );
 
102
 
 
103
  Uint32 senderRef;
 
104
  Uint32 senderData;
 
105
  Uint32 tableId;
 
106
  Uint32 fragId;
 
107
  Uint32 copyNodeId;
 
108
  Uint32 startingNodeId;
 
109
};
 
110
 
 
111
struct PrepareCopyFragRef
 
112
{
 
113
  Uint32 senderRef;
 
114
  Uint32 senderData;
 
115
  Uint32 tableId;
 
116
  Uint32 fragId;
 
117
  Uint32 copyNodeId;
 
118
  Uint32 startingNodeId;
 
119
  Uint32 errorCode;
 
120
 
 
121
  STATIC_CONST( SignalLength = 7 );
 
122
};
 
123
 
 
124
struct PrepareCopyFragConf
 
125
{
 
126
  STATIC_CONST( SignalLength = 7 );
 
127
 
 
128
  Uint32 senderRef;
 
129
  Uint32 senderData;
 
130
  Uint32 tableId;
 
131
  Uint32 fragId;
 
132
  Uint32 copyNodeId;
 
133
  Uint32 startingNodeId;
 
134
  Uint32 maxPageNo;
 
135
};
 
136
 
 
137
#endif