diff options
author | Eugene Kosov <claprix@yandex.ru> | 2021-09-10 16:58:21 +0600 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2021-09-10 16:58:21 +0600 |
commit | 4f85eadf71775979f97744abc536df6b67cf3e5d (patch) | |
tree | bbc4c7d50d0184c88396789f013f8941b69d0460 | |
parent | fdeaad1db923d4032f24322c237b68bcf8e9fb0e (diff) | |
download | mariadb-git-4f85eadf71775979f97744abc536df6b67cf3e5d.tar.gz |
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.
-rw-r--r-- | storage/innobase/dict/dict0load.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index 623403db3c8..2830aea167f 100644 --- a/storage/innobase/dict/dict0load.cc +++ b/storage/innobase/dict/dict0load.cc @@ -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: |