Browse Source
MDEV-20190 Instant operation fails when add column and collation change on non-indexed column
MDEV-20190 Instant operation fails when add column and collation change on non-indexed column
We must relax too strict debug assertions. For latin1_swedish_ci, mtype=DATA_CHAR or mtype=DATA_VARCHAR will be used instead of mtype=DATA_MYSQL or mtype=DATA_VARMYSQL. Likewise, some changes of dtype_get_charset_coll() do not affect the data type encoding, but only any indexes that are defined on the column. Charset::same_encoding(): Check whether two charset-collations have the same character set encoding. dict_col_t::same_encoding(): Check whether two character columns have the same character set encoding. dict_col_t::same_type(): Check whether two columns have a compatible data type encoding. dict_col_t::same_format(), dict_table_t::instant_column(): Do not compare mtype or the charset-collation of prtype directly. Rely on dict_col_t::same_type() instead. dtype_get_charset_coll(): Narrow the return type to uint16_t. This is a refined version of a fix that was developed by Thirunarayanan Balathandayuthapani.bb-10.4-MDEV-19781
8 changed files with 129 additions and 23 deletions
-
33mysql-test/suite/innodb/r/instant_alter_bugs.result
-
25mysql-test/suite/innodb/t/instant_alter_bugs.test
-
6sql/sql_string.h
-
9storage/innobase/dict/dict0mem.cc
-
3storage/innobase/handler/handler0alter.cc
-
17storage/innobase/include/data0type.h
-
12storage/innobase/include/data0type.ic
-
47storage/innobase/include/dict0mem.h
Write
Preview
Loading…
Cancel
Save
Reference in new issue