1 /* 2 Copyright (c) 2003, 2016, 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 BUILD_INDX_HPP 26 #define BUILD_INDX_HPP 27 28 #include "SignalData.hpp" 29 #include <NodeBitmask.hpp> 30 #include <signaldata/DictTabInfo.hpp> 31 32 #define JAM_FILE_ID 15 33 34 35 struct BuildIndxReq { 36 enum RequestType { 37 MainOp = 1, 38 SubOp = 2 // actual build of hash index 39 }; 40 41 enum RequestFlag { 42 RF_BUILD_OFFLINE = 1 << 8 43 }; 44 45 STATIC_CONST( SignalLength = 11 ); 46 STATIC_CONST( INDEX_COLUMNS = 0 ); 47 STATIC_CONST( KEY_COLUMNS = 1 ); 48 STATIC_CONST( NoOfSections = 2 ); 49 50 Uint32 clientRef; 51 Uint32 clientData; 52 Uint32 transId; 53 Uint32 transKey; 54 Uint32 requestInfo; 55 Uint32 buildId; // Suma subscription id 56 Uint32 buildKey; // Suma subscription key 57 Uint32 tableId; 58 Uint32 indexId; 59 Uint32 indexType; 60 Uint32 parallelism; 61 }; 62 63 struct BuildIndxConf { 64 STATIC_CONST( SignalLength = 6 ); 65 66 Uint32 senderRef; 67 union { Uint32 clientData, senderData; }; 68 Uint32 transId; 69 Uint32 tableId; 70 Uint32 indexId; 71 Uint32 indexType; 72 }; 73 74 struct BuildIndxRef { 75 enum ErrorCode { 76 NoError = 0, 77 Busy = 701, 78 NotMaster = 702, 79 BadRequestType = 4247, 80 InvalidPrimaryTable = 4249, 81 InvalidIndexType = 4250, 82 IndexNotUnique = 4251, 83 AllocationFailure = 4252, 84 InternalError = 4346, 85 IndexNotFound = 4243, 86 DeadlockError = 4351, 87 UtilBusy = 748 88 }; 89 90 STATIC_CONST( SignalLength = 10 ); 91 92 Uint32 senderRef; 93 union { Uint32 clientData, senderData; }; 94 Uint32 transId; 95 Uint32 tableId; 96 Uint32 indexId; 97 Uint32 indexType; 98 Uint32 errorCode; 99 Uint32 errorLine; 100 Uint32 errorNodeId; 101 Uint32 masterNodeId; 102 }; 103 104 105 #undef JAM_FILE_ID 106 107 #endif 108