Skip to content

Commit

Permalink
Merge 10.4 into 10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jun 27, 2022
2 parents ea847cb + b922ae5 commit 773f1da
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
9 changes: 9 additions & 0 deletions mysql-test/suite/innodb/r/instant_alter_upgrade.result
Original file line number Diff line number Diff line change
@@ -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;
16 changes: 16 additions & 0 deletions mysql-test/suite/innodb/t/instant_alter_upgrade.test
Original file line number Diff line number Diff line change
@@ -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;
5 changes: 4 additions & 1 deletion storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -980,10 +980,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
Expand Down
2 changes: 2 additions & 0 deletions storage/innobase/handler/handler0alter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6196,8 +6196,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));
}

Expand Down

0 comments on commit 773f1da

Please sign in to comment.