Commit d6baf3d3 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-12634 after-merge test fix: Exercise row_merge_write(), row_merge_read()

MySQL 5.7 introduced some optimizations to avoid file I/O during
ALGORITHM=INPLACE operations. While both innodb-index-online and
innodb-table-online will exercise both the merge sort files and
the online log files in 10.1, in 10.2 they would only exercise the
online log files.

Modify one test case in innodb.innodb-table-online so that
skip_pk_sort will not hold. In this way, this test case will
write and read the merge sort files. The other instrumented tests
in innodb-index-online and innodb-table-online will only write
and read online_log files.
parent d9277732
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted; @rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted;
sort_encrypted sort_decrypted log_encrypted log_decrypted sort_encrypted sort_decrypted log_encrypted log_decrypted
-0 0 0 0 -0 0 0 0
+0 0 1 1 +1 1 1 1
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5)); ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5));
ERROR 23000: Duplicate entry '' for key 'PRIMARY' ERROR 23000: Duplicate entry '' for key 'PRIMARY'
UPDATE t1 SET c3 = NULL WHERE c3 = ''; UPDATE t1 SET c3 = NULL WHERE c3 = '';
...@@ -321,7 +321,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT; ...@@ -321,7 +321,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
ERROR 42000: Multiple primary key defined ERROR 42000: Multiple primary key defined
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT; ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
ERROR 23000: Duplicate entry '5' for key 'PRIMARY' ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c22f,c4(5)), ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)),
CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f, CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE; ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
# session default # session default
...@@ -333,7 +333,7 @@ ddl_background_drop_indexes 0 ...@@ -333,7 +333,7 @@ ddl_background_drop_indexes 0
ddl_background_drop_tables 0 ddl_background_drop_tables 0
ddl_online_create_index 1 ddl_online_create_index 1
ddl_pending_alter_table 1 ddl_pending_alter_table 1
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 2
ddl_log_file_alter_table 1 ddl_log_file_alter_table 1
BEGIN; BEGIN;
INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 240; INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 240;
...@@ -349,7 +349,7 @@ ddl_background_drop_indexes 0 ...@@ -349,7 +349,7 @@ ddl_background_drop_indexes 0
ddl_background_drop_tables 0 ddl_background_drop_tables 0
ddl_online_create_index 1 ddl_online_create_index 1
ddl_pending_alter_table 1 ddl_pending_alter_table 1
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 2
ddl_log_file_alter_table 2 ddl_log_file_alter_table 2
SET DEBUG_SYNC = 'now SIGNAL dml3_done'; SET DEBUG_SYNC = 'now SIGNAL dml3_done';
# session con1 # session con1
...@@ -360,7 +360,7 @@ ddl_background_drop_indexes 0 ...@@ -360,7 +360,7 @@ ddl_background_drop_indexes 0
ddl_background_drop_tables 0 ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 2
ddl_log_file_alter_table 2 ddl_log_file_alter_table 2
SELECT COUNT(c22f) FROM t1; SELECT COUNT(c22f) FROM t1;
COUNT(c22f) COUNT(c22f)
...@@ -453,7 +453,7 @@ ddl_background_drop_indexes 0 ...@@ -453,7 +453,7 @@ ddl_background_drop_indexes 0
ddl_background_drop_tables 0 ddl_background_drop_tables 0
ddl_online_create_index 0 ddl_online_create_index 0
ddl_pending_alter_table 0 ddl_pending_alter_table 0
ddl_sort_file_alter_table 4 ddl_sort_file_alter_table 6
ddl_log_file_alter_table 2 ddl_log_file_alter_table 2
# session default # session default
connection default; connection default;
...@@ -464,15 +464,15 @@ ALTER TABLE t1 ROW_FORMAT=REDUNDANT; ...@@ -464,15 +464,15 @@ ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
SELECT * FROM t1 LIMIT 10; SELECT * FROM t1 LIMIT 10;
c22f c1 c3 c4 c22f c1 c3 c4
5 1 1foo Online 5 1 1foo Online
6 2 2foofoo Online
7 3 3foofoofoo Online
8 4 4foofoofoofoo Online
9 5 5foofoofoofoofoo Online
5 6 6foofoofoofoofoofoo Online 5 6 6foofoofoofoofoofoo Online
6 7 7foofoofoofoofoofoofoo Online 5 11 11foofoofoofoofoofoofoofoofoofoofoo Online
7 8 8foofoofoofoofoofoofoofoo Online 5 16 16foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
8 9 9foofoofoofoofoofoofoofoofoo Online 5 21 21foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
9 10 10foofoofoofoofoofoofoofoofoofoo Online 5 26 26foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 31 31foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 36 36foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 41 41foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
5 46 46foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online
# session con1 # session con1
connection con1; connection con1;
ALTER TABLE t1 DISCARD TABLESPACE; ALTER TABLE t1 DISCARD TABLESPACE;
...@@ -487,7 +487,7 @@ t1 CREATE TABLE `t1` ( ...@@ -487,7 +487,7 @@ t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL, `c1` int(11) NOT NULL,
`c3` char(255) NOT NULL, `c3` char(255) NOT NULL,
`c4` varchar(6) NOT NULL DEFAULT 'Online', `c4` varchar(6) NOT NULL DEFAULT 'Online',
PRIMARY KEY (`c1`,`c22f`,`c4`(5)) PRIMARY KEY (`c22f`,`c1`,`c4`(5))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'RESET';
SET GLOBAL innodb_monitor_disable = module_ddl; SET GLOBAL innodb_monitor_disable = module_ddl;
......
...@@ -288,7 +288,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT; ...@@ -288,7 +288,7 @@ ALTER TABLE t1 ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
--error ER_DUP_ENTRY --error ER_DUP_ENTRY
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT; ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT;
--send --send
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c22f,c4(5)), ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)),
CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f, CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f,
ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE; ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment