diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index 3a7d3dd5d86..4d541b779a6 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -1461,11 +1461,6 @@ void row_log_table_blob_alloc( const dict_col_t *new_col = log->table->get_col(col_no); ut_ad(new_col->mtype == col->mtype); - /* Assert that prtype matches except for nullability. */ - ut_ad(!((new_col->prtype ^ col->prtype) & ~DATA_NOT_NULL)); - ut_ad(!((new_col->prtype ^ dfield_get_type(dfield)->prtype) & - ~DATA_NOT_NULL)); - if (new_col->prtype == col->prtype) { continue; } diff --git a/mysql-test/suite/innodb/t/bug_report_online_rebuild_redundant_char_corruption.test b/mysql-test/suite/innodb/t/bug_report_online_rebuild_redundant_char_corruption.test new file mode 100644 index 00000000000..75f1e10dc78 --- /dev/null +++ b/mysql-test/suite/innodb/t/bug_report_online_rebuild_redundant_char_corruption.test @@ -0,0 +1,31 @@ +--source include/have_debug.inc +--source include/have_debug_sync.inc + +CREATE TABLE bug_report_online_rebuild_redundant_char_corruption ( + id INT NOT NULL PRIMARY KEY, + c CHAR(32) NOT NULL DEFAULT '' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC; + +INSERT INTO bug_report_online_rebuild_redundant_char_corruption + VALUES (1, 'before alter'); + +connect (con1,localhost,root,,); + +connection con1; +SET DEBUG_SYNC = + 'alter_table_inplace_after_lock_downgrade SIGNAL alter_ready WAIT_FOR dml_done'; +--send ALTER TABLE bug_report_online_rebuild_redundant_char_corruption CONVERT TO CHARACTER SET utf8mb4, ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE + +connection default; +SET DEBUG_SYNC='now WAIT_FOR alter_ready'; +INSERT INTO bug_report_online_rebuild_redundant_char_corruption + VALUES (2, 'during alter'); +SET DEBUG_SYNC='now SIGNAL dml_done'; + +connection con1; +--reap + +connection default; +SET DEBUG_SYNC='RESET'; +CHECK TABLE bug_report_online_rebuild_redundant_char_corruption; +DROP TABLE bug_report_online_rebuild_redundant_char_corruption;