1 /* Copyright (C) 2007 MySQL AB 2 Use is subject to license terms 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 Street, Fifth Floor, Boston, MA 02110-1301, USA */ 23 24 #ifndef BUILD_INDX_IMPL_HPP 25 #define BUILD_INDX_IMPL_HPP 26 27 #include "SignalData.hpp" 28 29 struct BuildIndxImplReq 30 { 31 enum RequestFlag { 32 RF_BUILD_OFFLINE = 1 << 8 33 ,RF_NO_DISK = 1 << 9 /* Indexed columns are not on disk */ 34 }; 35 36 STATIC_CONST( SignalLength = 10 ); 37 STATIC_CONST( INDEX_COLUMNS = 0 ); 38 STATIC_CONST( KEY_COLUMNS = 1 ); 39 STATIC_CONST( NoOfSections = 2 ); 40 41 Uint32 senderRef; 42 Uint32 senderData; 43 Uint32 requestType; 44 Uint32 transId; 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 BuildIndxImplConf { 54 STATIC_CONST( SignalLength = 2 ); 55 56 Uint32 senderRef; 57 Uint32 senderData; 58 }; 59 60 struct BuildIndxImplRef { 61 enum ErrorCode { 62 NoError = 0, 63 Busy = 701, 64 NotMaster = 702, 65 BadRequestType = 4247, 66 InvalidPrimaryTable = 4249, 67 InvalidIndexType = 4250, 68 IndexNotUnique = 4251, 69 AllocationFailure = 4252, 70 InternalError = 4346 71 }; 72 73 STATIC_CONST( SignalLength = 6 ); 74 75 Uint32 senderRef; 76 Uint32 senderData; 77 Uint32 errorCode; 78 Uint32 errorLine; 79 Uint32 errorNodeId; 80 Uint32 masterNodeId; 81 }; 82 83 struct mt_BuildIndxReq 84 { 85 Uint32 senderRef; 86 Uint32 senderData; 87 88 Uint32 indexId; 89 Uint32 tableId; 90 Uint32 fragId; 91 92 void * tux_ptr; // ptr to Dbtux 93 void * tup_ptr; 94 Uint32 (* func_ptr)(void *); // c-function 95 96 void * mem_buffer; // allocated by FS 97 Uint32 buffer_size; // 98 99 Uint32 pad[3]; 100 101 STATIC_CONST( SignalLength = (6 + 3 + 4 * (sizeof(void*) / 4))); 102 }; 103 104 #endif 105