MDEV-25951 followup

FTS indexes has a prefix_len=1 or prefix_len=0 as stated by comment in
mysql_prepare_create_table().

Thus, a newly added assertion should be relaxed for FTS indexes.
This commit is contained in:
Eugene Kosov 2021-09-10 16:58:21 +06:00
commit 4f85eadf71

View file

@ -2577,10 +2577,15 @@ corrupted:
goto func_exit;
}
for (uint i = 0; i < index->n_fields; i++) {
dict_field_t &f = index->fields[i];
ut_ad(f.col->mbmaxlen == 0
|| f.prefix_len % f.col->mbmaxlen == 0);
// The following assertion doesn't hold for FTS indexes
// as it may have prefix_len=1 with any charset
if (index->type != DICT_FTS) {
for (uint i = 0; i < index->n_fields; i++) {
dict_field_t &f = index->fields[i];
ut_ad(f.col->mbmaxlen == 0
|| f.prefix_len
% f.col->mbmaxlen == 0);
}
}
}
next_rec: