• Eugene Kosov's avatar
    MDEV-25951 MariaDB crash after ALTER TABLE convert to utf8mb4 · a4b3970c
    Eugene Kosov authored
    Bug happens when partially indexed CHAR or VARCHAR field in converted from
    utf8mb3 to utf8mb4.
    
    Fixing by relaxing assertions. For some time dict_index_t and dict_table_t
    are becoming not synchronized. Namely, dict_index_t has a new prefix_len which
    is a multiple of a user-provided length and charset->mbmaxlen. But
    the table still have and old mbmaxlen and assertion fails. This happens only
    during utf8mb3 -> utf8mb4 conversions and the magic number 4 comes from
    utf8mb_4_.
    
    At the end of ALTER TABLE (innobase_rename_or_enlarge_columns_cache())
    dict_index_t and dict_table_t became synchronized
    again and will stay so at all times. For, example, they will be synchronized
    on table load and newly added assertion proves that.
    a4b3970c
instant_alter_charset.result 83.9 KB