1 /* 2 Copyright (c) 2005, 2021, Oracle and/or its affiliates. 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 NDB_EXTENT_HPP 26 #define NDB_EXTENT_HPP 27 28 #include "SignalData.hpp" 29 30 #define JAM_FILE_ID 86 31 32 33 struct AllocExtentReq { 34 /** 35 * Sender(s) / Reciver(s) 36 */ 37 38 /** 39 * For printing 40 */ 41 42 STATIC_CONST( SignalLength = 3 ); 43 44 enum ErrorCode { 45 UnmappedExtentPageIsNotImplemented = 1, 46 NoExtentAvailable = 1601, 47 NoDatafile = 1602 48 }; 49 50 union 51 { 52 struct 53 { 54 Uint32 tablespace_id; 55 Uint32 table_id; 56 Uint32 fragment_id; 57 } request; 58 struct 59 { 60 Uint32 errorCode; 61 Local_key page_id; 62 Uint32 page_count; 63 } reply; 64 }; 65 }; 66 67 struct FreeExtentReq { 68 /** 69 * Sender(s) / Reciver(s) 70 */ 71 72 /** 73 * For printing 74 */ 75 76 STATIC_CONST( SignalLength = 4 ); 77 78 enum ErrorCode { 79 UnmappedExtentPageIsNotImplemented = 1 80 }; 81 82 union 83 { 84 struct 85 { 86 Local_key key; 87 Uint32 table_id; 88 Uint32 tablespace_id; 89 Uint32 lsn_hi; 90 Uint32 lsn_lo; 91 } request; 92 struct 93 { 94 Uint32 errorCode; 95 } reply; 96 }; 97 }; 98 99 struct AllocPageReq { 100 /** 101 * Sender(s) / Reciver(s) 102 */ 103 104 /** 105 * For printing 106 */ 107 108 STATIC_CONST( SignalLength = 3 ); 109 110 enum ErrorCode { 111 UnmappedExtentPageIsNotImplemented = 1, 112 NoPageFree= 2 113 }; 114 115 Local_key key; // in out 116 Uint32 bits; // in out 117 union 118 { 119 struct 120 { 121 Uint32 table_id; 122 Uint32 fragment_id; 123 Uint32 tablespace_id; 124 } request; 125 struct 126 { 127 Uint32 errorCode; 128 } reply; 129 }; 130 }; 131 132 133 134 #undef JAM_FILE_ID 135 136 #endif 137