Loading innobase/data/data0data.c +5 −5 Original line number Diff line number Diff line Loading @@ -561,12 +561,12 @@ dtuple_convert_big_rec( } /* We do not store externally fields which are smaller than DICT_MAX_COL_PREFIX_LEN */ DICT_MAX_INDEX_COL_LEN */ ut_a(DICT_MAX_COL_PREFIX_LEN > REC_1BYTE_OFFS_LIMIT); ut_a(DICT_MAX_INDEX_COL_LEN > REC_1BYTE_OFFS_LIMIT); if (longest < BTR_EXTERN_FIELD_REF_SIZE + 10 + DICT_MAX_COL_PREFIX_LEN) { + DICT_MAX_INDEX_COL_LEN) { /* Cannot shorten more */ mem_heap_free(heap); Loading @@ -588,10 +588,10 @@ dtuple_convert_big_rec( dfield = dtuple_get_nth_field(entry, longest_i); vector->fields[n_fields].field_no = longest_i; ut_a(dfield->len > DICT_MAX_COL_PREFIX_LEN); ut_a(dfield->len > DICT_MAX_INDEX_COL_LEN); vector->fields[n_fields].len = dfield->len - DICT_MAX_COL_PREFIX_LEN; - DICT_MAX_INDEX_COL_LEN; vector->fields[n_fields].data = mem_heap_alloc(heap, vector->fields[n_fields].len); Loading innobase/dict/dict0dict.c +1 −1 Original line number Diff line number Diff line Loading @@ -1625,7 +1625,7 @@ dict_index_add_col( variable-length fields, so that the extern flag can be embedded in the length word. */ if (field->fixed_len > DICT_MAX_COL_PREFIX_LEN) { if (field->fixed_len > DICT_MAX_INDEX_COL_LEN) { field->fixed_len = 0; } Loading innobase/include/dict0mem.h +7 −7 Original line number Diff line number Diff line Loading @@ -152,12 +152,12 @@ struct dict_col_struct{ in some of the functions below */ }; /* DICT_MAX_COL_PREFIX_LEN is measured in bytes. Starting from 4.1.6, we set max col prefix len to < 3 * 256, so that one can create a column prefix index on 255 characters of a TEXT field also in the UTF-8 charset. In that charset, a character may take at most 3 bytes. */ /* DICT_MAX_INDEX_COL_LEN is measured in bytes and is the max index column length + 1. Starting from 4.1.6, we set it to < 3 * 256, so that one can create a column prefix index on 255 characters of a TEXT field also in the UTF-8 charset. In that charset, a character may take at most 3 bytes. */ #define DICT_MAX_COL_PREFIX_LEN 768 #define DICT_MAX_INDEX_COL_LEN 768 /* Data structure for a field in an index */ struct dict_field_struct{ Loading @@ -169,12 +169,12 @@ struct dict_field_struct{ prefix in bytes in a MySQL index of type, e.g., INDEX (textcol(25)); must be smaller than DICT_MAX_COL_PREFIX_LEN; NOTE that DICT_MAX_INDEX_COL_LEN; NOTE that in the UTF-8 charset, MySQL sets this to 3 * the prefix len in UTF-8 chars */ ulint fixed_len; /* 0 or the fixed length of the column if smaller than DICT_MAX_COL_PREFIX_LEN */ DICT_MAX_INDEX_COL_LEN */ ulint fixed_offs; /* offset to the field, or ULINT_UNDEFINED if it is not fixed within the record (due to preceding Loading innobase/include/row0mysql.h +8 −2 Original line number Diff line number Diff line Loading @@ -335,8 +335,14 @@ int row_create_index_for_mysql( /*=======================*/ /* out: error number or DB_SUCCESS */ dict_index_t* index, /* in: index defintion */ trx_t* trx); /* in: transaction handle */ dict_index_t* index, /* in: index definition */ trx_t* trx, /* in: transaction handle */ const ulint* field_lengths); /* in: if not NULL, must contain dict_index_get_n_fields(index) actual field lengths for the index columns, which are then checked for not being too large. */ /************************************************************************* Scans a table create SQL string and adds to the data dictionary the foreign key constraints declared in the string. This function Loading innobase/rem/rem0rec.c +1 −1 Original line number Diff line number Diff line Loading @@ -621,7 +621,7 @@ rec_set_nth_field_extern_bit_new( if (field->fixed_len) { /* fixed-length fields cannot be external (Fixed-length fields longer than DICT_MAX_COL_PREFIX_LEN will be treated as DICT_MAX_INDEX_COL_LEN will be treated as variable-length ones in dict_index_add_col().) */ ut_ad(i != ith); continue; Loading Loading
innobase/data/data0data.c +5 −5 Original line number Diff line number Diff line Loading @@ -561,12 +561,12 @@ dtuple_convert_big_rec( } /* We do not store externally fields which are smaller than DICT_MAX_COL_PREFIX_LEN */ DICT_MAX_INDEX_COL_LEN */ ut_a(DICT_MAX_COL_PREFIX_LEN > REC_1BYTE_OFFS_LIMIT); ut_a(DICT_MAX_INDEX_COL_LEN > REC_1BYTE_OFFS_LIMIT); if (longest < BTR_EXTERN_FIELD_REF_SIZE + 10 + DICT_MAX_COL_PREFIX_LEN) { + DICT_MAX_INDEX_COL_LEN) { /* Cannot shorten more */ mem_heap_free(heap); Loading @@ -588,10 +588,10 @@ dtuple_convert_big_rec( dfield = dtuple_get_nth_field(entry, longest_i); vector->fields[n_fields].field_no = longest_i; ut_a(dfield->len > DICT_MAX_COL_PREFIX_LEN); ut_a(dfield->len > DICT_MAX_INDEX_COL_LEN); vector->fields[n_fields].len = dfield->len - DICT_MAX_COL_PREFIX_LEN; - DICT_MAX_INDEX_COL_LEN; vector->fields[n_fields].data = mem_heap_alloc(heap, vector->fields[n_fields].len); Loading
innobase/dict/dict0dict.c +1 −1 Original line number Diff line number Diff line Loading @@ -1625,7 +1625,7 @@ dict_index_add_col( variable-length fields, so that the extern flag can be embedded in the length word. */ if (field->fixed_len > DICT_MAX_COL_PREFIX_LEN) { if (field->fixed_len > DICT_MAX_INDEX_COL_LEN) { field->fixed_len = 0; } Loading
innobase/include/dict0mem.h +7 −7 Original line number Diff line number Diff line Loading @@ -152,12 +152,12 @@ struct dict_col_struct{ in some of the functions below */ }; /* DICT_MAX_COL_PREFIX_LEN is measured in bytes. Starting from 4.1.6, we set max col prefix len to < 3 * 256, so that one can create a column prefix index on 255 characters of a TEXT field also in the UTF-8 charset. In that charset, a character may take at most 3 bytes. */ /* DICT_MAX_INDEX_COL_LEN is measured in bytes and is the max index column length + 1. Starting from 4.1.6, we set it to < 3 * 256, so that one can create a column prefix index on 255 characters of a TEXT field also in the UTF-8 charset. In that charset, a character may take at most 3 bytes. */ #define DICT_MAX_COL_PREFIX_LEN 768 #define DICT_MAX_INDEX_COL_LEN 768 /* Data structure for a field in an index */ struct dict_field_struct{ Loading @@ -169,12 +169,12 @@ struct dict_field_struct{ prefix in bytes in a MySQL index of type, e.g., INDEX (textcol(25)); must be smaller than DICT_MAX_COL_PREFIX_LEN; NOTE that DICT_MAX_INDEX_COL_LEN; NOTE that in the UTF-8 charset, MySQL sets this to 3 * the prefix len in UTF-8 chars */ ulint fixed_len; /* 0 or the fixed length of the column if smaller than DICT_MAX_COL_PREFIX_LEN */ DICT_MAX_INDEX_COL_LEN */ ulint fixed_offs; /* offset to the field, or ULINT_UNDEFINED if it is not fixed within the record (due to preceding Loading
innobase/include/row0mysql.h +8 −2 Original line number Diff line number Diff line Loading @@ -335,8 +335,14 @@ int row_create_index_for_mysql( /*=======================*/ /* out: error number or DB_SUCCESS */ dict_index_t* index, /* in: index defintion */ trx_t* trx); /* in: transaction handle */ dict_index_t* index, /* in: index definition */ trx_t* trx, /* in: transaction handle */ const ulint* field_lengths); /* in: if not NULL, must contain dict_index_get_n_fields(index) actual field lengths for the index columns, which are then checked for not being too large. */ /************************************************************************* Scans a table create SQL string and adds to the data dictionary the foreign key constraints declared in the string. This function Loading
innobase/rem/rem0rec.c +1 −1 Original line number Diff line number Diff line Loading @@ -621,7 +621,7 @@ rec_set_nth_field_extern_bit_new( if (field->fixed_len) { /* fixed-length fields cannot be external (Fixed-length fields longer than DICT_MAX_COL_PREFIX_LEN will be treated as DICT_MAX_INDEX_COL_LEN will be treated as variable-length ones in dict_index_add_col().) */ ut_ad(i != ith); continue; Loading