summaryrefslogtreecommitdiff
path: root/storage/innobase/data
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/data
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/data')
-rw-r--r--storage/innobase/data/data0data.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/storage/innobase/data/data0data.c b/storage/innobase/data/data0data.c
index 0ef0cfa554a..6d07fc249fa 100644
--- a/storage/innobase/data/data0data.c
+++ b/storage/innobase/data/data0data.c
@@ -585,7 +585,8 @@ dtuple_convert_big_rec(
if (dict_table_get_format(index->table) < DICT_TF_FORMAT_ZIP) {
/* up to MySQL 5.1: store a 768-byte prefix locally */
- local_len = BTR_EXTERN_FIELD_REF_SIZE + DICT_MAX_INDEX_COL_LEN;
+ local_len = BTR_EXTERN_FIELD_REF_SIZE
+ + DICT_ANTELOPE_MAX_INDEX_COL_LEN;
} else {
/* new-format table: do not store any BLOB prefix locally */
local_len = BTR_EXTERN_FIELD_REF_SIZE;
@@ -757,7 +758,10 @@ dtuple_convert_back_big_rec(
local_len -= BTR_EXTERN_FIELD_REF_SIZE;
- ut_ad(local_len <= DICT_MAX_INDEX_COL_LEN);
+ /* Only in REDUNDANT and COMPACT format, we store
+ up to DICT_ANTELOPE_MAX_INDEX_COL_LEN (768) bytes
+ locally */
+ ut_ad(local_len <= DICT_ANTELOPE_MAX_INDEX_COL_LEN);
dfield_set_data(dfield,
(char*) b->data - local_len,