1 /*
2    Copyright (c) 2003, 2013, 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, version 2.0,
6    as published by the Free Software Foundation.
7 
8    This program is also distributed with certain software (including
9    but not limited to OpenSSL) that is licensed under separate terms,
10    as designated in a particular file or component or in included license
11    documentation.  The authors of MySQL hereby grant you an additional
12    permission to link the program and your derivative works with the
13    separately licensed software that they have included with MySQL.
14 
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License, version 2.0, for more details.
19 
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
23 */
24 
25 #ifndef CREATE_INDX_HPP
26 #define CREATE_INDX_HPP
27 
28 #include "SignalData.hpp"
29 #include <NodeBitmask.hpp>
30 #include <signaldata/DictTabInfo.hpp>
31 
32 #define JAM_FILE_ID 8
33 
34 
35 struct CreateIndxReq
36 {
37   STATIC_CONST( SignalLength = 9 );
38   SECTION( ATTRIBUTE_LIST_SECTION = 0 );
39   SECTION( INDEX_NAME_SECTION = 1 );
40 
41   enum RequestType
42   {
43     RF_BUILD_OFFLINE = 1 << 8 // See BuildIndxReq
44   };
45 
46   Uint32 clientRef;
47   Uint32 clientData;
48   Uint32 transId;
49   Uint32 transKey;
50   Uint32 requestInfo;
51   Uint32 tableId;
52   Uint32 tableVersion;
53   Uint32 indexType;
54   Uint32 online;
55 };
56 
57 struct CreateIndxConf {
58   STATIC_CONST( SignalLength = 5 );
59 
60   Uint32 senderRef;
61   Uint32 clientData;
62   Uint32 transId;
63   Uint32 indexId;
64   Uint32 indexVersion;
65 };
66 
67 struct CreateIndxRef {
68   STATIC_CONST( SignalLength = 7 );
69 
70   enum ErrorCode {
71     NoError = 0,
72     Busy = 701,
73     BusyWithNR = 711,
74     NotMaster = 702,
75     IndexOnDiskAttributeError = 756,
76     TriggerNotFound = 4238,
77     TriggerExists = 4239,
78     IndexNameTooLong = 4241,
79     TooManyIndexes = 4242,
80     IndexExists = 4244,
81     AttributeNullable = 4246,
82     BadRequestType = 4247,
83     InvalidName = 4248,
84     InvalidPrimaryTable = 4249,
85     InvalidIndexType = 4250,
86     NotUnique = 4251,
87     AllocationError = 4252,
88     CreateIndexTableFailed = 4253,
89     DuplicateAttributes = 4258,
90     SingleUser = 299,
91     TableIsTemporary = 776,
92     TableIsNotTemporary = 777,
93     NoLoggingTemporaryIndex = 778
94   };
95 
96   Uint32 senderRef;
97   Uint32 clientData;
98   Uint32 transId;
99   Uint32 errorCode;
100   Uint32 errorLine;
101   Uint32 errorNodeId;
102   Uint32 masterNodeId;
103 };
104 
105 
106 #undef JAM_FILE_ID
107 
108 #endif
109