00001 /* Copyright (C) 2003 MySQL AB 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00016 00017 #ifndef NDB_LIMITS_H 00018 #define NDB_LIMITS_H 00019 00020 #include <mysql.h> 00021 00022 #define RNIL 0xffffff00 00023 00028 #define MAX_NDB_NODES 49 00029 #define MAX_NODES 64 00030 #define UNDEF_NODEGROUP 0xFFFF 00031 00039 #define MAX_REPLICAS 4 00040 00044 #define MAX_LCP_STORED 3 00045 00049 #define MAX_LOG_EXEC 4 00050 00054 #define MAX_TUPLES_PER_PAGE 8191 00055 #define MAX_TUPLES_BITS 13 /* 13 bits = 8191 tuples per page */ 00056 #define MAX_TABLES 20320 /* SchemaFile.hpp */ 00057 #define MAX_TAB_NAME_SIZE 128 00058 #define MAX_ATTR_NAME_SIZE NAME_LEN /* From mysql_com.h */ 00059 #define MAX_ATTR_DEFAULT_VALUE_SIZE 128 00060 #define MAX_ATTRIBUTES_IN_TABLE 128 00061 #define MAX_ATTRIBUTES_IN_INDEX 32 00062 #define MAX_TUPLE_SIZE_IN_WORDS 2013 00063 #define MAX_KEY_SIZE_IN_WORDS 1023 00064 #define MAX_FRM_DATA_SIZE 6000 00065 #define MAX_NULL_BITS 4096 00066 #define MAX_FRAGMENT_DATA_BYTES (4+(2 * 8 * MAX_REPLICAS * MAX_NDB_NODES)) 00067 #define MAX_NDB_PARTITIONS 1024 00068 #define MAX_RANGE_DATA (131072+MAX_NDB_PARTITIONS) //0.5 MByte of list data 00069 #define MAX_WORDS_META_FILE 16382 00070 00071 #define MIN_ATTRBUF ((MAX_ATTRIBUTES_IN_TABLE/24) + 1) 00072 /* 00073 * Max Number of Records to fetch per SCAN_NEXTREQ in a scan in LQH. The 00074 * API can order a multiple of this number of records at a time since 00075 * fragments can be scanned in parallel. 00076 */ 00077 #define MAX_PARALLEL_OP_PER_SCAN 992 00078 /* 00079 * The default batch size. Configurable parameter. 00080 */ 00081 #define DEF_BATCH_SIZE 64 00082 /* 00083 * When calculating the number of records sent from LQH in each batch 00084 * one uses SCAN_BATCH_SIZE divided by the expected size of signals 00085 * per row. This gives the batch size used for the scan. The NDB API 00086 * will receive one batch from each node at a time so there has to be 00087 * some care taken also so that the NDB API is not overloaded with 00088 * signals. 00089 * This parameter is configurable, this is the default value. 00090 */ 00091 #define SCAN_BATCH_SIZE 32768 00092 /* 00093 * To protect the NDB API from overload we also define a maximum total 00094 * batch size from all nodes. This parameter should most likely be 00095 * configurable, or dependent on sendBufferSize. 00096 * This parameter is configurable, this is the default value. 00097 */ 00098 #define MAX_SCAN_BATCH_SIZE 262144 00099 /* 00100 * Maximum number of Parallel Scan queries on one hash index fragment 00101 */ 00102 #define MAX_PARALLEL_SCANS_PER_FRAG 12 00103 /* 00104 * Maximum parallel ordered index scans per primary table fragment. 00105 * Implementation limit is (256 minus 12). 00106 */ 00107 #define MAX_PARALLEL_INDEX_SCANS_PER_FRAG 32 00108 00112 #define MAXNROFATTRIBUTESINWORDS (MAX_ATTRIBUTES_IN_TABLE / 32) 00113 00114 /* 00115 * Ordered index constants. Make configurable per index later. 00116 */ 00117 #define MAX_TTREE_NODE_SIZE 64 /* total words in node */ 00118 #define MAX_TTREE_PREF_SIZE 4 /* words in min prefix */ 00119 #define MAX_TTREE_NODE_SLACK 2 /* diff between max and min occupancy */ 00120 00121 /* 00122 * Blobs. 00123 */ 00124 #define NDB_BLOB_HEAD_SIZE 2 /* sizeof(NdbBlob::Head) >> 2 */ 00125 00126 /* 00127 * Character sets. 00128 */ 00129 #define MAX_XFRM_MULTIPLY 8 /* max expansion when normalizing */ 00130 00134 #define MAX_FILES_PER_FILEGROUP 1024 00135 00139 #define GLOBAL_PAGE_SIZE 32768 00140 #define GLOBAL_PAGE_SIZE_WORDS 8192 00141 00142 /* 00143 * Long signals 00144 */ 00145 #define NDB_SECTION_SEGMENT_SZ 60 00146 00147 /* 00148 * Restore Buffer in pages 00149 * 4M 00150 */ 00151 #define LCP_RESTORE_BUFFER (4*32) 00152 00153 #endif
1.4.7

