InnoDB Plugin  1.0
rem0types.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free Software
7 Foundation; version 2 of the License.
8 
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License along with
14 this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
16 
17 *****************************************************************************/
18 
19 /********************************************************************/
26 #ifndef rem0types_h
27 #define rem0types_h
28 
29 /* We define the physical record simply as an array of bytes */
30 typedef byte rec_t;
31 
32 /* Maximum values for various fields (for non-blob tuples) */
33 #define REC_MAX_N_FIELDS (1024 - 1)
34 #define REC_MAX_HEAP_NO (2 * 8192 - 1)
35 #define REC_MAX_N_OWNED (16 - 1)
36 
37 /* Maximum number of user defined fields/columns. The reserved columns
38 are the ones InnoDB adds internally: DB_ROW_ID, DB_TRX_ID, DB_ROLL_PTR.
39 We need "* 2" because mlog_parse_index() creates a dummy table object
40 possibly, with some of the system columns in it, and then adds the 3
41 system columns (again) using dict_table_add_system_columns(). The problem
42 is that mlog_parse_index() cannot recognize the system columns by
43 just having n_fields, n_uniq and the lengths of the columns. */
44 #define REC_MAX_N_USER_FIELDS (REC_MAX_N_FIELDS - DATA_N_SYS_COLS * 2)
45 
46 /* REC_ANTELOPE_MAX_INDEX_COL_LEN is measured in bytes and is the maximum
47 indexed field length (or indexed prefix length) for indexes on tables of
48 ROW_FORMAT=REDUNDANT and ROW_FORMAT=COMPACT format.
49 Before we support UTF-8 encodings with mbmaxlen = 4, a UTF-8 character
50 may take at most 3 bytes. So the limit was set to 3*256, so that one
51 can create a column prefix index on 256 characters of a TEXT or VARCHAR
52 column also in the UTF-8 charset.
53 This constant MUST NOT BE CHANGED, or the compatibility of InnoDB data
54 files would be at risk! */
55 #define REC_ANTELOPE_MAX_INDEX_COL_LEN 768
56 
61 #define REC_VERSION_56_MAX_INDEX_COL_LEN 3072
62 
71 };
72 typedef enum rec_format_enum rec_format_t;
73 
74 #endif