Skip to content

Commit 5d9afb6

Browse files
author
Marko Mäkelä
committed
Revert Bug#21968191 FAILING ASSERTION: !FIELD->PREFIX_LEN || FIELD->FIXED_LEN
The fix would have changed the storage format of affected secondary indexes, by no longer storing the length of the long fixed-length column prefixes. This reverts the commits a368c8bb217c362f5104aa3ed6965100f6d58452 and cf549c25688f4ded1ef100fdeeede9dd7a69efd4.
1 parent 14af3b5 commit 5d9afb6

File tree

3 files changed

+4
-43
lines changed

3 files changed

+4
-43
lines changed

mysql-test/suite/innodb/r/index_rec_size.result

Lines changed: 0 additions & 14 deletions
This file was deleted.

mysql-test/suite/innodb/t/index_rec_size.test

Lines changed: 0 additions & 18 deletions
This file was deleted.

storage/innobase/dict/dict0dict.cc

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,6 @@ dict_index_node_ptr_max_size(
22782278
ulint i;
22792279
/* maximum possible storage size of a record */
22802280
ulint rec_max_size;
2281-
bool clust = dict_index_is_clust(index);
22822281

22832282
if (dict_index_is_ibuf(index)) {
22842283
/* cannot estimate accurately */
@@ -2321,17 +2320,11 @@ dict_index_node_ptr_max_size(
23212320
ulint field_ext_max_size;
23222321

23232322
/* Determine the maximum length of the index field. */
2324-
field_max_size = dict_col_get_fixed_size(col, comp);
2325-
2326-
bool within_limit = field_max_size <= DICT_MAX_FIXED_COL_LEN;
23272323

2328-
/* For clustered index, fixed length fields longer than
2329-
DICT_MAX_FIXED_COL_LEN needs to be treated as a variable
2330-
length field. */
2331-
if (field_max_size > 0 && (!clust || within_limit)) {
2332-
/* dict_index_add_col() guarantees this */
2333-
ut_ad(field->prefix_len == 0
2334-
|| field->fixed_len == 0
2324+
field_max_size = dict_col_get_fixed_size(col, comp);
2325+
if (field_max_size) {
2326+
/* dict_index_add_col() should guarantee this */
2327+
ut_ad(!field->prefix_len
23352328
|| field->fixed_len == field->prefix_len);
23362329
/* Fixed lengths are not encoded
23372330
in ROW_FORMAT=COMPACT. */

0 commit comments

Comments
 (0)