MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BuildIndx.hpp
1 /*
2  Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef BUILD_INDX_HPP
19 #define BUILD_INDX_HPP
20 
21 #include "SignalData.hpp"
22 #include <NodeBitmask.hpp>
23 #include <signaldata/DictTabInfo.hpp>
24 
25 struct BuildIndxReq {
26  enum RequestType {
27  MainOp = 1,
28  SubOp = 2 // actual build of hash index
29  };
30 
31  enum RequestFlag {
32  RF_BUILD_OFFLINE = 1 << 8
33  };
34 
35  STATIC_CONST( SignalLength = 11 );
36  STATIC_CONST( INDEX_COLUMNS = 0 );
37  STATIC_CONST( KEY_COLUMNS = 1 );
38  STATIC_CONST( NoOfSections = 2 );
39 
40  Uint32 clientRef;
41  Uint32 clientData;
42  Uint32 transId;
43  Uint32 transKey;
44  Uint32 requestInfo;
45  Uint32 buildId; // Suma subscription id
46  Uint32 buildKey; // Suma subscription key
47  Uint32 tableId;
48  Uint32 indexId;
49  Uint32 indexType;
50  Uint32 parallelism;
51 };
52 
53 struct BuildIndxConf {
54  STATIC_CONST( SignalLength = 6 );
55 
56  Uint32 senderRef;
57  union { Uint32 clientData, senderData; };
58  Uint32 transId;
59  Uint32 tableId;
60  Uint32 indexId;
61  Uint32 indexType;
62 };
63 
64 struct BuildIndxRef {
65  enum ErrorCode {
66  NoError = 0,
67  Busy = 701,
68  NotMaster = 702,
69  BadRequestType = 4247,
70  InvalidPrimaryTable = 4249,
71  InvalidIndexType = 4250,
72  IndexNotUnique = 4251,
73  AllocationFailure = 4252,
74  InternalError = 4346,
75  IndexNotFound = 4243,
76  DeadlockError = 4351
77  };
78 
79  STATIC_CONST( SignalLength = 10 );
80 
81  Uint32 senderRef;
82  union { Uint32 clientData, senderData; };
83  Uint32 transId;
84  Uint32 tableId;
85  Uint32 indexId;
86  Uint32 indexType;
87  Uint32 errorCode;
88  Uint32 errorLine;
89  Uint32 errorNodeId;
90  Uint32 masterNodeId;
91 };
92 
93 #endif