diff options
Diffstat (limited to 'innobase/btr/btr0btr.c')
-rw-r--r-- | innobase/btr/btr0btr.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/innobase/btr/btr0btr.c b/innobase/btr/btr0btr.c index d8a0959e47f..1af9336ce72 100644 --- a/innobase/btr/btr0btr.c +++ b/innobase/btr/btr0btr.c @@ -2376,8 +2376,15 @@ btr_index_rec_validate( type = dict_index_get_nth_type(index, i); - if (len != UNIV_SQL_NULL && dtype_is_fixed_size(type) - && len != dtype_get_fixed_size(type)) { + if ((dict_index_get_nth_field(index, i)->prefix_len == 0 + && len != UNIV_SQL_NULL && dtype_is_fixed_size(type) + && len != dtype_get_fixed_size(type)) + || + (dict_index_get_nth_field(index, i)->prefix_len > 0 + && len != UNIV_SQL_NULL && dtype_is_fixed_size(type) + && len != + dict_index_get_nth_field(index, i)->prefix_len)) { + fprintf(stderr, "InnoDB: Record in index %s in table %s, page %lu, at offset %lu\n" "InnoDB: field %lu len is %lu, should be %lu\n", |