diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-27 16:16:20 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-27 16:16:20 +0300 |
commit | b922ae5fc938caccd59f09c8e4825431cd01bc30 (patch) | |
tree | 3c4b753c5ddb60bdd15af41cf99dd705893d1893 | |
parent | dd7e9fb38a71064992a12ca58b5366f48b21e0b4 (diff) | |
parent | f339ef3f9793d5de8f825f1ec6489550b98e7e9a (diff) | |
download | mariadb-git-b922ae5fc938caccd59f09c8e4825431cd01bc30.tar.gz |
Merge 10.3 into 10.4
-rw-r--r-- | mysql-test/suite/innodb/r/instant_alter_upgrade.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/instant_alter_upgrade.test | 16 | ||||
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 5 | ||||
-rw-r--r-- | storage/innobase/handler/handler0alter.cc | 2 |
4 files changed, 31 insertions, 1 deletions
diff --git a/mysql-test/suite/innodb/r/instant_alter_upgrade.result b/mysql-test/suite/innodb/r/instant_alter_upgrade.result new file mode 100644 index 00000000000..fc7d28963ca --- /dev/null +++ b/mysql-test/suite/innodb/r/instant_alter_upgrade.result @@ -0,0 +1,9 @@ +# +# MDEV-26577 InnoDB: Failing assertion: dict_tf2_is_valid(flags, flags2) +# during ADD COLUMN +# +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +CREATE TABLE t2(a INT PRIMARY KEY) ENGINE=InnoDB; +FLUSH TABLES; +ALTER TABLE t2 ADD COLUMN b INT; +DROP TABLE t1,t2; diff --git a/mysql-test/suite/innodb/t/instant_alter_upgrade.test b/mysql-test/suite/innodb/t/instant_alter_upgrade.test new file mode 100644 index 00000000000..d73fe187a72 --- /dev/null +++ b/mysql-test/suite/innodb/t/instant_alter_upgrade.test @@ -0,0 +1,16 @@ +--source include/have_innodb.inc +--source include/innodb_row_format.inc + +--echo # +--echo # MDEV-26577 InnoDB: Failing assertion: dict_tf2_is_valid(flags, flags2) +--echo # during ADD COLUMN +--echo # + +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +CREATE TABLE t2(a INT PRIMARY KEY) ENGINE=InnoDB; +FLUSH TABLES; +--let $datadir=`select @@datadir` +--remove_file $datadir/test/t2.frm +--copy_file $datadir/test/t1.frm $datadir/test/t2.frm +ALTER TABLE t2 ADD COLUMN b INT; +DROP TABLE t1,t2; diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 940e6d5d8ab..64715851ce1 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -1242,10 +1242,13 @@ buf_madvise_do_dump() } #endif +#ifndef UNIV_DEBUG static inline byte hex_to_ascii(byte hex_digit) { - return hex_digit <= 9 ? '0' + hex_digit : ('a' - 10) + hex_digit; + const int offset= hex_digit <= 9 ? '0' : 'a' - 10; + return byte(hex_digit + offset); } +#endif /** Dump a page to stderr. @param[in] read_buf database page diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 91a5fd3ca4a..7b92ea85215 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -6279,8 +6279,10 @@ prepare_inplace_alter_table_dict( /* If we promised ALGORITHM=NOCOPY or ALGORITHM=INSTANT, we must retain the original ROW_FORMAT of the table. */ flags = (user_table->flags & (DICT_TF_MASK_COMPACT + | DICT_TF_MASK_ZIP_SSIZE | DICT_TF_MASK_ATOMIC_BLOBS)) | (flags & ~(DICT_TF_MASK_COMPACT + | DICT_TF_MASK_ZIP_SSIZE | DICT_TF_MASK_ATOMIC_BLOBS)); } |