MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CopyFrag.hpp
1 /*
2  Copyright (C) 2003, 2005-2007 MySQL AB
3  All rights reserved. Use is subject to license terms.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; version 2 of the License.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #ifndef COPY_FRAG_HPP
20 #define COPY_FRAG_HPP
21 
22 #include "SignalData.hpp"
23 
24 class CopyFragReq {
28  friend class Dbdih;
29 
33  friend class Dblqh;
34 public:
35  STATIC_CONST( SignalLength = 11 );
36 
37 private:
38 
39  enum
40  {
41  CFR_TRANSACTIONAL = 1, // Copy rows >= gci in transactional fashion
42  CFR_NON_TRANSACTIONAL = 2 // Copy rows <= gci in non transactional fashion
43  };
44  union {
45  Uint32 userPtr;
46  Uint32 senderData;
47  };
48  union {
49  Uint32 userRef;
50  Uint32 senderRef;
51  };
52  Uint32 tableId;
53  Uint32 fragId;
54  Uint32 nodeId;
55  Uint32 schemaVersion;
56  Uint32 distributionKey;
57  Uint32 gci;
58  Uint32 nodeCount;
59  Uint32 nodeList[1];
60  //Uint32 maxPage; is stored in nodeList[nodeCount]
61  //Uint32 requestInfo is stored after maxPage
62 };
63 
64 class CopyFragConf {
68  friend class Dblqh;
69 
73  friend class Dbdih;
74 public:
75  STATIC_CONST( SignalLength = 7 );
76 
77 private:
78  union {
79  Uint32 userPtr;
80  Uint32 senderData;
81  };
82  Uint32 sendingNodeId;
83  Uint32 startingNodeId;
84  Uint32 tableId;
85  Uint32 fragId;
86  Uint32 rows_lo;
87  Uint32 bytes_lo;
88 };
89 class CopyFragRef {
93  friend class Dblqh;
94 
98  friend class Dbdih;
99 public:
100  STATIC_CONST( SignalLength = 6 );
101 
102 private:
103  Uint32 userPtr;
104  Uint32 sendingNodeId;
105  Uint32 startingNodeId;
106  Uint32 tableId;
107  Uint32 fragId;
108  Uint32 errorCode;
109 };
110 
112 {
113  Uint32 tableId;
114  Uint32 fragId;
115  Uint32 fragDistributionKey;
116 
117  STATIC_CONST( SignalLength = 3 );
118 };
119 
121 {
122  STATIC_CONST( SignalLength = 6 );
123 
124  Uint32 senderRef;
125  Uint32 senderData;
126  Uint32 tableId;
127  Uint32 fragId;
128  Uint32 copyNodeId;
129  Uint32 startingNodeId;
130 };
131 
133 {
134  Uint32 senderRef;
135  Uint32 senderData;
136  Uint32 tableId;
137  Uint32 fragId;
138  Uint32 copyNodeId;
139  Uint32 startingNodeId;
140  Uint32 errorCode;
141 
142  STATIC_CONST( SignalLength = 7 );
143 };
144 
146 {
147  STATIC_CONST( SignalLength = 7 );
148 
149  Uint32 senderRef;
150  Uint32 senderData;
151  Uint32 tableId;
152  Uint32 fragId;
153  Uint32 copyNodeId;
154  Uint32 startingNodeId;
155  Uint32 maxPageNo;
156 };
157 
158 #endif