1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-13898 Corruption during online table-rebuilding ALTER of ROW_FORMAT=REDUNDANT tables

This bug is a regression caused by the code refactoring in
commit f5a833c3e0. It was not present
in any release of the MariaDB server. The bug affects table-rebuilding
ALTER TABLE when the source table is in ROW_FORMAT=REDUNDANT and
contains no virtual columns.

row_log_table_low_redundant(): Log virtual column data only if
virtual columns are present.
This commit is contained in:
Marko Mäkelä
2017-09-25 09:29:27 +03:00
parent cd2a85e763
commit 21614f4a85
3 changed files with 17 additions and 7 deletions

View File

@@ -167,7 +167,8 @@ ROLLBACK;
connection con1;
KILL QUERY @id;
ERROR 70100: Query execution was interrupted
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR kill_done';
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml_done';
SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done';
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
# session default
connection default;
@@ -180,6 +181,10 @@ ddl_online_create_index 1
ddl_pending_alter_table 1
ddl_sort_file_alter_table 0
ddl_log_file_alter_table 0
BEGIN;
INSERT INTO t1 VALUES(7,4,2);
ROLLBACK;
SET DEBUG_SYNC = 'now SIGNAL dml_done WAIT_FOR applied';
KILL QUERY @id;
SET DEBUG_SYNC = 'now SIGNAL kill_done';
# session con1
@@ -227,6 +232,7 @@ t1 CREATE TABLE `t1` (
`c3` char(255) NOT NULL,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done';
SET lock_wait_timeout = 10;
ALTER TABLE t1 ROW_FORMAT=COMPACT, ALGORITHM = INPLACE;