summaryrefslogtreecommitdiff
path: root/storage/innobase/include/rem0types.h
diff options
context:
space:
mode:
authorJimmy Yang <jimmy.yang@oracle.com>2011-05-31 02:12:32 -0700
committerJimmy Yang <jimmy.yang@oracle.com>2011-05-31 02:12:32 -0700
commit9e2b7fa7d5f0cbe4920be5567314b6de1af660a4 (patch)
tree21100612140d5618d083e91268a4594a0836953c /storage/innobase/include/rem0types.h
parent53e9aabe126ad73845958818f5872fcd4425588c (diff)
downloadmariadb-git-9e2b7fa7d5f0cbe4920be5567314b6de1af660a4.tar.gz
Implement worklog #5743 InnoDB: Lift the limit of index key prefixes.
With this change, the index prefix column length lifted from 767 bytes to 3072 bytes if "innodb_large_prefix" is set to "true". rb://603 approved by Marko
Diffstat (limited to 'storage/innobase/include/rem0types.h')
-rw-r--r--storage/innobase/include/rem0types.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/storage/innobase/include/rem0types.h b/storage/innobase/include/rem0types.h
index 8b84d4af233..7afd595be90 100644
--- a/storage/innobase/include/rem0types.h
+++ b/storage/innobase/include/rem0types.h
@@ -34,13 +34,21 @@ typedef byte rec_t;
#define REC_MAX_HEAP_NO (2 * 8192 - 1)
#define REC_MAX_N_OWNED (16 - 1)
-/* REC_MAX_INDEX_COL_LEN is measured in bytes and is the maximum
-indexed column length (or indexed prefix length). It is set to 3*256,
-so that one can create a column prefix index on 256 characters of a
-TEXT or VARCHAR column also in the UTF-8 charset. In that charset,
-a character may take at most 3 bytes.
+/* REC_ANTELOPE_MAX_INDEX_COL_LEN is measured in bytes and is the maximum
+indexed field length (or indexed prefix length) for indexes on tables of
+ROW_FORMAT=REDUNDANT and ROW_FORMAT=COMPACT format.
+Before we support UTF-8 encodings with mbmaxlen = 4, a UTF-8 character
+may take at most 3 bytes. So the limit was set to 3*256, so that one
+can create a column prefix index on 256 characters of a TEXT or VARCHAR
+column also in the UTF-8 charset.
This constant MUST NOT BE CHANGED, or the compatibility of InnoDB data
files would be at risk! */
-#define REC_MAX_INDEX_COL_LEN 768
+#define REC_ANTELOPE_MAX_INDEX_COL_LEN 768
+
+/** Maximum indexed field length for table format DICT_TF_FORMAT_ZIP and
+beyond.
+This (3072) is the maximum index row length allowed, so we cannot create index
+prefix column longer than that. */
+#define REC_VERSION_56_MAX_INDEX_COL_LEN 3072
#endif