Commit 58f2c842 authored by Marko Mäkelä's avatar Marko Mäkelä

Adjust tests for instant ADD COLUMN

parent 669c5150
......@@ -29,11 +29,11 @@ DROP TABLE t1ć, ①;
# Bug #21364096 THE BOGUS DUPLICATE KEY ERROR IN ONLINE DDL
# WITH INCORRECT KEY NAME
create table t1 (id int auto_increment primary key, a int, unique key uk(a))
engine = innodb row_format=redundant;
engine = innodb;
insert into t1 select 1, 1;
insert into t1 select 2, 2;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
alter table t1 add b int, ALGORITHM=inplace;
alter table t1 force, add b int, ALGORITHM=inplace;
/* connection con1 */
connect con1,localhost,root,,;
SET DEBUG_SYNC = 'now WAIT_FOR s1';
......@@ -42,10 +42,10 @@ ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'now SIGNAL s2';
/* connection default */
connection default;
/* reap */ alter table t1 add b int, ALGORITHM=inplace;
/* reap */ alter table t1 force, add b int, ALGORITHM=inplace;
ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
alter table t1 add b int, ALGORITHM=inplace;;
alter table t1 force, add b int, ALGORITHM=inplace;;
/* connection con1 */
connection con1;
set DEBUG_SYNC = 'now WAIT_FOR s1';
......@@ -55,7 +55,7 @@ SET DEBUG_SYNC = 'now SIGNAL s2';
disconnect con1;
/* connection default */
connection default;
/* reap */ alter table t1 add b int, ALGORITHM=inplace;
/* reap */ alter table t1 force, add b int, ALGORITHM=inplace;
ERROR 23000: Duplicate entry '1' for key 'uk'
SET DEBUG_SYNC = 'RESET';
drop table t1;
......@@ -83,7 +83,7 @@ create table t1(k1 int auto_increment primary key,
k2 char(200),k3 char(200))engine=innodb;
SET DEBUG_SYNC= 'row_merge_after_scan
SIGNAL opened WAIT_FOR flushed';
ALTER TABLE t1 ADD COLUMN k4 int;
ALTER TABLE t1 FORCE, ADD COLUMN k4 int;
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET debug = '+d,row_log_tmpfile_fail';
......
......@@ -35,14 +35,12 @@ DROP TABLE t1ć, ①;
--echo # Bug #21364096 THE BOGUS DUPLICATE KEY ERROR IN ONLINE DDL
--echo # WITH INCORRECT KEY NAME
# because of instant add, here we use redundant row format first,
# And change it when "ALGORITHM=instant" is introduced
create table t1 (id int auto_increment primary key, a int, unique key uk(a))
engine = innodb row_format=redundant;
engine = innodb;
insert into t1 select 1, 1;
insert into t1 select 2, 2;
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
--send alter table t1 add b int, ALGORITHM=inplace
--send alter table t1 force, add b int, ALGORITHM=inplace
--echo /* connection con1 */
connect (con1,localhost,root,,);
......@@ -53,12 +51,12 @@ SET DEBUG_SYNC = 'now SIGNAL s2';
--echo /* connection default */
connection default;
--echo /* reap */ alter table t1 add b int, ALGORITHM=inplace;
--echo /* reap */ alter table t1 force, add b int, ALGORITHM=inplace;
--error ER_DUP_ENTRY
--reap
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL s1 WAIT_FOR s2';
--send alter table t1 add b int, ALGORITHM=inplace;
--send alter table t1 force, add b int, ALGORITHM=inplace;
--echo /* connection con1 */
connection con1;
......@@ -70,7 +68,7 @@ disconnect con1;
--echo /* connection default */
connection default;
--echo /* reap */ alter table t1 add b int, ALGORITHM=inplace;
--echo /* reap */ alter table t1 force, add b int, ALGORITHM=inplace;
--error ER_DUP_ENTRY
--reap
SET DEBUG_SYNC = 'RESET';
......
......@@ -96,7 +96,7 @@ create table t1(k1 int auto_increment primary key,
k2 char(200),k3 char(200))engine=innodb;
SET DEBUG_SYNC= 'row_merge_after_scan
SIGNAL opened WAIT_FOR flushed';
send ALTER TABLE t1 ADD COLUMN k4 int;
send ALTER TABLE t1 FORCE, ADD COLUMN k4 int;
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET debug = '+d,row_log_tmpfile_fail';
......
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